eProsima / Micro-XRCE-DDS

An XRCE DDS implementation. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
156 stars 17 forks source link

can a node be a subscriber and also a publisher ? #81

Closed vibnwis closed 3 years ago

vibnwis commented 3 years ago

Hi, I was wondering if a node can be a subscriber as well as a publisher or publishers. To be honest, I am very new to the DDS's RTPS protocols. Being a publisher, publishing the "health inventory of a system", I would like to check the "health" conditions of all nodes. I was thinking of subscribing all the nodes out there for checking their "health" conditions. Any comments is very much appreciated.

Thank you V

pablogs9 commented 3 years ago

There is no concept of a node in (XRCE-)DDS, you use participants, each participant can have many publishers and subscribers. You can take a look at this documentation to understand the DDS concepts better: https://fast-dds.docs.eprosima.com/en/latest/.

vibnwis commented 3 years ago

I am reading the multiple Session HelloWorld. In the above answer, you said a participant can have multiple publishers and subscribers. My questions are why are the benefits or reasons for implementing multiple sessions architecture comparing to a single session architecture?

pablogs9 commented 3 years ago

There are no benefits, just different ways of structuring your code.