Waiting for Acknowledgments in a Publisher

The Publisher’s wait_for_acknowledgments() operation blocks the calling thread until either all data written by the Publisher’s reliable DataWriters is acknowledged or the duration specified by the max_wait parameter elapses, whichever happens first.

Note that if a thread is blocked in the call to wait_for_acknowledgments() on a Publisher and a different thread writes new DDS samples on any of the Publisher’s reliable DataWriters, the new DDS samples must be acknowledged before unblocking the thread that is waiting on wait_for_acknowledgments().

DDS_ReturnCode_t wait_for_acknowledgments (const DDS_Duration_t &  max_wait)

This operation returns DDS_RETCODE_OK if all the DDS samples were acknowledged, or DDS_RETCODE_TIMEOUT if the max_wait duration expired first.

There is a similar operation available for individual DataWriters, see Waiting for Acknowledgments in a DataWriter.

The reliability protocol used by Connext DDS is discussed in Reliable Communications.

© 2018 RTI