How many Domain Participants can be created in a single address space?

Note: Relevant RTI Connext versions: RTI Connext 4.x and above

The default settings for RTI Connext 4.x and above will allow approximately 11 (5 for 4.4c and below) domain participants in a single application (address space). The number of domain participants on a given node is only limited by system resources.

If you run out of thread-specific objects, you may see this error message:

PRESPsService_new:!create worker-specific object

Note: A worker in this case can be thought of as a thread.

or this error message:

RTIOsapiSharedMemoryMutex_create:OS semget() failure, error 0x1C

If you need more than 11 (5 for 4.4c and below) domain participants in an application:

The DomainParticipantFactory's SystemResourceLimits QoS Policy controls how much memory is allocated for thread-specific objects (i.e., thread-specific data in POSIX terminology). For example, to fix the problem under C++, add the following to the beginning of your code, before calling any other RTI Connext APIs:

DDS_DomainParticipantFactoryQos factoryQoS;
/* increase max_objects_per_thread as needed. 
 * The default is 1024 (512 for 4.4c and below). */
factoryQoS.resource_limits.max_objects_per_thread = 2048; 

You should be able to create about 30 participants with the above setting.

Note that in RTI DDS 4.0g, the corresponding Java API for the SystemResourceLimits QoS was non-functional. This was corrected in 4.0i.