This QosPolicy is used to enable or disable asynchronous publishing, asynchronous batch flushing, and TopicQuery publishing for the Publisher.
If so configured, the Publisher will spawn three threads, one for asynchronous publishing, one for asynchronous batch flushing, and one for TopicQuery publication.
The asynchronous publisher thread will be shared by all DataWriters (belonging to this Publisher) that have their PUBLISH_MODE QosPolicy (DDS Extension) kind set to ASYNCHRONOUS. The asynchronous publishing thread will then handle the data transmission chores for those DataWriters. This thread will only be spawned when the first of these DataWriters is enabled.
The asynchronous publisher thread can be used to reduce amount of time spent in the user thread to send data. You can use it to send large data reliably. Large in this context means that the data cannot be sent as a single packet by a transport. For example, to send data larger than 63K reliably using UDP/IP, you must configure Connext DDS to send the data using asynchronous Publishers.
The asynchronous batch flushing thread will be shared by all DataWriters (belonging to this Publisher) that have batching enabled and max_flush_delay different than DURATION_INFINITE in BATCH QosPolicy (DDS Extension). This thread will only be spawned when the first of these DataWriters is enabled.
The TopicQuery publication thread will be shared by all DataWriters (belonging to this Publisher) that have topic query dispatch enabled in TOPIC_QUERY_DISPATCH_QosPolicy (DDS Extension). This thread will only be spawned when the first of these DataWriters is enabled.
This QosPolicy allows you to adjust the asynchronous publishing, the asynchronous batch flushing threads, and the TopicQuery publication threads independently.
Batching and asynchronous publication are independent of one another. Flushing a batch on an asynchronous DataWriter makes it available for sending to the DataWriter's FlowControllers (DDS Extension). From the point of view of the FlowController, a batch is treated like one large DDS sample.
Connext DDS will sometimes coalesce multiple DDS samples into a single network datagram. For example, DDS samples buffered by a FlowController or sent in response to a negative acknowledgement (NACK) may be coalesced. This behavior is distinct from DDS sample batching. DDS data samples sent by different asynchronous DataWriters belonging to the same Publisher to the same destination will not be coalesced into a single network packet. Instead, two separate network packets will be sent. Only DDS samples written by the same DataWriter and intended for the same destination will be coalesced.
This QosPolicy includes the members in DDS_AsynchronousPublisherQosPolicy.
Type |
Field Name |
Description |
DDS_Boolean |
disable_asynchronous_write |
Disables asynchronous publishing. To write asynchronously, this field must be FALSE (the default). |
DDS_ThreadSettings_t |
thread |
Settings for the publishing thread. These settings are OS-dependent (see the RTI Connext DDS Core Libraries Platform Notes). |
DDS_Boolean |
disable_asynchronous_batch |
Disables asynchronous batch flushing. To flush asynchronously, this field must be FALSE (the default). |
DDS_ThreadSettings_t |
asynchronous_batch_thread |
Settings for the asynchronous batch flushing thread. These settings are OS-dependent (see the RTI Connext DDS Core Libraries Platform Notes). |
DDS_Boolean |
disable_topic_query_publication |
Disables TopicQuery publication. To allow publishing TopicQueries responses, this field must be FALSE (the default). |
DDS_ThreadSettings_t |
topic_query_publication_thread |
Settings for the TopicQuery publication thread. These settings are OS-dependent (see the RTI Connext DDS Core Libraries Platform Notes). |
This QosPolicy cannot be modified after the Publisher is created.
Since it is only for Publishers, there are no compatibility restrictions for how it is set on the publishing and subscribing sides.
Three threads can potentially be created:
© 2018 RTI