Enabling batch

3 posts / 0 new
Last post
Offline
Last seen: 5 years 7 months ago
Joined: 02/27/2018
Posts: 8
Enabling batch

Hi

I have an application where I am trying to enable batch mode.

The application will update 1000 topics where each has a size of 28 bytes very quickly after each other. When I run the application without batch this is working as expected my subscriber receives all 1000 updates. When I enable batch mode the updates seem to disappear. There is no error when I write the sample. I use default QoS setting in the code except for the datawriter and datareader.

DDS_DataWriterQos clWriterQos;
pclPublisher->get_default_datawriter_qos( clWriterQos );
clWriterQos.durability.kind = DDS_TRANSIENT_LOCAL_DURABILITY_QOS;
clWriterQos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS;
clWriterQos.durability_service.history_depth = 10;

DDS_DataReaderQos clReaderQos;
pclSubscriber->get_default_datareader_qos( clReaderQos );
clReaderQos.durability.kind = DDS_TRANSIENT_LOCAL_DURABILITY_QOS;
clReaderQos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS;

 I have tried several USER_QOS_PROFILES.xml settings and I tried with the settings from high_throughput.xml. For all of them if I change <enable>true</enable> to <enable>false</enable> in the <batch> section it works fine. I also get some updates thru if I send many updates on each topic but I only want to send two.

When I subscribe the topics in the "RTI Administration console" I can not see the updates either. So I guess its a publisher setting that I am missing or somthing.

Can you point me on some direction to look for errors ?

Thanks.

Offline
Last seen: 5 years 7 months ago
Joined: 02/27/2018
Posts: 8

Hi

After some digging I found that it was becuse I had not set <max_flush_delay>. I guess that because I was never filling up the max_data_bytes it never got send.

pranjali's picture
Offline
Last seen: 6 years 5 months ago
Joined: 01/16/2018
Posts: 4

Hi Kennet,

Yes, you are right. By default the value for the max_flush_delay is DDS_DURATION_INFINITE. 

You can also look at configuring the DDS_BatchQosPolicy::max_samples parameter.