44.7 RECEIVER_POOL QosPolicy (DDS Extension)

The RECEIVER_POOL QosPolicy configures the internal Connext thread used to process the data received from a transport. The Receive thread is described in detail in Chapter 67 Receive Threads.

This QosPolicy contains the members in Table 44.10 DDS_ReceiverPoolQoSPolicy.

Table 44.10 DDS_ReceiverPoolQoSPolicy

Type

Field Name

Description

struct DDS_ThreadSettings_t

thread.mask

thread.priority

thread.stack_size

hread.cpu_list

thread.cpu_rotation

Thread settings for the receive thread(s) used by Connext to process data received from a transport. The values used for these settings are OS-dependent; see the RTI Connext Core Libraries Platform Notes for details.

See also: Chapter 69 Controlling CPU Core Affinity for RTI Threads and 50.4.7 Thread Settings.

DDS_Long

buffer_size

Size of the receive buffer in bytes.

The receive buffer is used by the receive thread to store the raw data that arrives over the transports in non-zero-copy transports.

Zero-copy transports do not copy their data into the buffer provided by the receive thread. Instead, they provide the receive thread data in buffers allocated by the transports themselves. Only the shared memory built-in transport (SHMEM) supports zero-copy.

buffer_size must always be at least as large as the maximum message_size_max across all of the transports being used that are not doing zero-copy.

By default, the buffer_size is AUTO (e.g., DDS_LENGTH_AUTO in C/C++), which is equal to the maximum message_size_max across all of the non-zero-copy transports. You may want the value to be greater than the default if you try to limit the largest data packet that can be sent through the transport(s) in one application, but you still want to receive data from other applications that have not made the same change.

For example, to avoid IP fragmentation, you may want to set the message_size_max for IP-based transports to a small value, such as 1400 bytes. However, you may not be able to apply this change to all the applications at the same time. To receive data from these other applications, the buffer_size should be equal to the original message_size_max for the transport.

For information on the valid range, see the API Reference HTML documentation.

DDS_Long

buffer_alignment

Byte-alignment of the receive buffer. For the default and valid range, see the API Reference HTML documentation.

This QosPolicy sets the thread properties, like priority level and stack size, for the threads used to receive and process data from transports. Connext uses a separate receive thread per port per transport plugin. To force Connext to use a separate thread to process the data for a DataReader, you should set a unique port for the 47.28 TRANSPORT_UNICAST QosPolicy (DDS Extension) or 48.5 TRANSPORT_MULTICAST QosPolicy (DDS Extension) for the DataReader.

Connext creates at least one thread for every transport that is installed and enabled for use by the DomainParticipant for receiving data. These threads are used to process data DDS samples received for the participant’s DataReaders, as well as messages used by Connext itself in support of the application discovery process discussed in Chapter 22 Discovery Overview.

The user application may configure Connext to create many more threads for receiving data sent via multicast or even to dedicate a thread to process the DDS data samples of a single DataReader received on a particular transport. This QosPolicy is used in the creation of all receive threads.

44.7.1 Example

When new data arrives on a transport, the receive thread may invoke the on_data_available() of the Listener callback of a DataReader. Thus, you may want to adjust the priority of the receive threads with respect to the other threads in the application as appropriate for the proper operation of the system.

44.7.2 Properties

This QosPolicy cannot be modified after the DomainParticipant is created.

It can be set differently on the publishing and subscribing sides.

44.7.3 Related QosPolicies

44.7.4 Applicable DDS Entities

44.7.5 System Resource Considerations

Increasing the buffer_size will increase memory used by a receive thread.

Setting the thread parameters correctly on a real-time operating system is usually critical to the proper overall functionality of the applications on that system. Larger values for the thread.stack_size parameter will use up more memory.