You are here: Part 2: Core Concepts > Working with DDS Domains > Fundamentals of DDS Domains and DomainParticipants

Fundamentals of DDS Domains and DomainParticipants

DomainParticipants are the focal point for creating, destroying, and managing other Connext DDS objects. A DDS domain is a logical network of applications: only applications that belong to the same DDS domain may communicate using Connext DDS. A DDS domain is identified by a unique integer value known as a domain ID. An application participates in a DDS domain by creating a DomainParticipant for that domain ID.

Figure 1 Relationship between Applications and DDS Domains

Applications can belong to multiple DDS domains—A belongs to DDS domains 1 and 2. Applications in the same DDS domain can communicate with each other, such as A and B, or A and C. Applications in different DDS domains, such as B and C, are not even aware of each other and will not exchange messages.

As seen in Figure 1, a single application can participate in multiple DDS domains by creating multiple DomainParticipants with different domain IDs. DomainParticipants in the same DDS domain form a logical network; they are isolated from DomainParticipants of other DDS domains, even those running on the same set of physical computers sharing the same physical network. DomainParticipants in different DDS domains will never exchange messages with each other. Thus, a DDS domain establishes a “virtual network” linking all DomainParticipants that share the same domain ID.

An application that wants to participate in a certain DDS domain will need to create a DomainParticipant. As seen in Figure 2, a DomainParticipant object is a container for all other Entities that belong to the same DDS domain. It acts as factory for the Publisher, Subscriber, and Topic entities. (As seen in Sending Data and Receiving Data, in turn, Publishers are factories for DataWriters and Subscribers are factories for DataReaders.) DomainParticipants cannot contain other DomainParticipants.

Like all Entities, DomainParticipants have QosPolicies and Listeners. The DomainParticipant entity also allows you to set ‘default’ values for the QosPolicies for all the entities created from it or from the entities that it creates (Publishers, Subscribers, Topics, DataWriters, and DataReaders).

Figure 2 DDS Domain Module

Note: MultiTopics are not supported.

© 2016 RTI