Chapter 21 Working with Topics

For a DataWriter and DataReader to communicate, they need to use the same Topic. A Topic includes a name and an association with a user data type that has been registered with Connext. Topic names are how different parts of the communication system find each other. Topics are named streams of data of the same data type. DataWriters publish DDS samples into the stream; DataReaders subscribe to data from the stream. More than one Topic can use the same user data type, but each Topic needs a unique name.

Topics, DataWriters, and DataReaders relate to each other as follows:

  • Multiple Topics (each with a unique name) can use the same user data type.
  • Applications may have multiple DataWriters for each Topic.
  • Applications may have multiple DataReaders for each Topic.
  • DataWriters and DataReaders must be associated with the same Topic in order for them to be connected.
  • Topics are created and deleted by a DomainParticipant, and as such, are owned by that DomainParticipant. When two applications (DomainParticipants) want to use the same Topic, they must both create the Topic (even if the applications are on the same node).

Connext uses ‘Builtin Topics’ to discover and keep track of remote entities, such as new participants in the DDS domain. Builtin Topics are discussed in Chapter 31 Accessing Discovery Information through Built-In Topics.