Does RTI DDS block when a message can not be sent from a guaranteed writer due to no readers being found

3 posts / 0 new
Last post
Last seen: 4 years 3 months ago
Joined: 05/21/2014
Posts: 46
Does RTI DDS block when a message can not be sent from a guaranteed writer due to no readers being found

I have a class that is running as a daemon that as part of the class sends a results file through an RTI DDS message with the writer being a guranteed writer.


My question is the follwing, I do not want this class to ever be stuck forever since that will cause issues with the program and lock the program up. With that in mind, if the guranteed writer ever can't find anywhere to write the message to will the whole class just lock up due to a blocking call until the message is sent, or does RTI hand off the sending of the message to some under the cover threads that make this scenario impossible? 

Gerardo Pardo's picture
Last seen: 2 weeks 21 hours ago
Joined: 06/02/2010
Posts: 602


No, a DDS DataWriter will not block if has no matched DataReaders, it will just put the data in its history cache and return. Blocking occurs when there are unresponsive reliable DataReaders that are not keeping up with the flow.

The situations under which the DataWriter::write() operation may block are documented in the API documentation for that call. See:

To sum it up to avoid blocking a reliable DataWriter you need to configure 



DDS_ResourceLimitsQosPolicy::max_samples >= DDS_ResourceLimitsQosPolicy::max_instances *DDS_HistoryQosPolicy::depth

Alternatively, you can control the maximum blocking using the RELIABILITY max_blocking_time . Thos Qos policy configures the maximum time the write operation may block (waiting for space to become available). If max_blocking_time elapses before the DDSDataWriter is able to store the modification without exceeding the limits, the operation will time out and return  (DDS_RETCODE_TIMEOUT), so it will not be "stuck forever"


Last seen: 6 years 7 months ago
Joined: 09/17/2015
Posts: 53


Sorry for reviving this thread. I have a positive history depth with a reliable data writer. Unfortunately, it happens that my (non-async) datawriter blocks forever.  No timeout exception is ever thrown.

All resource settings are the default.

How can I approach and debug this problem?

Best regards,