One topic, many users

2 posts / 0 new
Last post
Last seen: 1 year 1 week ago
Joined: 12/07/2016
Posts: 10
One topic, many users


This is a bit of a design question. All RTI examples I saw so far use the one-topic->one-type methodology. I suspect I can reuse the type on a different topics.

However, can I setup one topic and use it to publish more than one type?


rip's picture
Last seen: 1 day 21 hours ago
Joined: 04/06/2012
Posts: 321

You can publish more than one type on a Topic, with the following understandings:

1) A datawriter writes one specific type.  A datareader reads one specific type.

2) Any given datawriter or datareader, attached to that topic, has to be using Types which are inherited from the same base class (ShapeType<->ShapeTypeExtended, ShapeTypeExtended<->ShapeType, ShapeType<->ShapeType, ShapeTypeExtended<->ShapeTypeExtended)

What happens when a reader receives something on the Topic written by a writer with a different sub-class of the parent is well-defined. 

See the Extensible Types for DDS standard.

For the most part, "Wild west" topics aren't allowed, if a writer says "FooType" on topic "Fnorb", and reader says "BarType" on "Fnorb", they won't see each other.