You must modify the RELIABILITY QosPolicy of the DataWriter and each of its reliable DataReaders. Set the kind field to DDS_RELIABLE_RELIABILITY_QOS:
writer_qos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS;
reader_qos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS;
The max_blocking_time property in the RELIABILITY QosPolicy indicates how long a DataWriter can be blocked during a write().
If max_blocking_time is non-zero and the reliability send queue is full, the write is blocked (the DDS sample is not sent). If max_blocking_time has passed and the DDS sample is still not sent, write() returns DDS_RETCODE_TIMEOUT and the DDS sample is not sent.
If the number of unacknowledged DDS samples in the reliability send queue drops below max_samples (set in the RESOURCE_LIMITS QosPolicy) before max_blocking_time, the DDS sample is sent and write() returns DDS_RETCODE_OK.
If max_blocking_time is zero and the reliability send queue is full, write() returns DDS_RETCODE_TIMEOUT and the DDS sample is not sent.
© 2018 RTI