Why can't more than 5 DomainParticipants communicate within in the same machine?
If you have more than 5 DomainParticipants in the same machine, you may notice that your applications are not able to communicate with Participant number 6 and following ones. This is because by default we discover up to 5 DomainParticipants in one location.
This behavior is controlled by the Peer Descriptor used in your Initial Peers List. Each Peer Descriptor has associated a Participant ID limit. The Participant ID limit indicates the maximum Participant ID to be contacted by the RTI Connext discovery mechanism at the given locator. This limit is 4 by default. For example, this is the default initial peer for the localhost address:
4@udpv4://localhost
The initial "4" is the Participant ID limit. Since the Participant ID starts on number 0, this Peer Descriptor will allow to communicate with a maximum of 5 DomainParticipants, with Participant IDs 0 to 4. This is independent of the transports used by each DomainParticipant, since the Participant ID is uniquely assigned per host machine.
This means that if you want to have more than 5 DomainParticipants communicating between them in your machine, you will need to increase the Participant ID limit.
Please take into account that the Participant ID limit only applies to unicast locators; it is ignored for multicast locators (and therefore should be omitted for multicast peer descriptors).
For example, imagine that you want to have up to 15 DomainParticipants, both using UDPv4 and Shared Memory transports. To fix this via XML you will add the following to your Initial Peers List:
<participant_qos> <discovery> <initial_peers> <element>14@builtin.udpv4://127.0.0.1</element> <element>14@builtin.shmem://</element> </initial_peers> </discovery> </participant_qos>
You can find more information in section "Peer Descriptor format" of the Core Libraries User’s Manual.