Controlling Queue Depth with the History QosPolicy

If you want to achieve strict reliability, set the kind field in the HISTORY QosPolicy for both the DataReader and DataWriter to KEEP_ALL; in this case, the depth does not matter.

Or, for non-strict reliability, you can leave the kind set to KEEP_LAST (the default). This will provide non-strict reliability; some DDS samples may not be delivered if the resource limit is reached.

The depth field in the HISTORY QosPolicy controls how many DDS samples Connext DDS will attempt to keep on the DataWriter’s send queue or the DataReader’s receive queue. For reliable communications, depth should be >= 1. The depth can be set to 1, but cannot be more than the max_samples_per_instance in RESOURCE_LIMITS QosPolicy.

Example:

  writer_qos.history.depth = <number of DDS samples to keep in send queue>;
  reader_qos.history.depth = <number of DDS samples to keep in receive queue>;

© 2018 RTI