Finding Routing Service Instances

2 posts / 0 new
Last post
Last seen: 4 years 7 months ago
Joined: 10/01/2015
Posts: 1
Finding Routing Service Instances

When I start my Java application, I launch a routing service instance with a configuration profile named after my application.


In the event that my application terminates abnormally, the routing service is not closed.


Therefore, when my Application starts, I would like to obtain the process ID of any routing service that has a profile matching my application's profile so I know I do not have to start another instance.

What API can I use to obtain this information? RTI Admin Console is able to display this information but I am not sure what it does to obtain it.


Thank you

Gerardo Pardo's picture
Last seen: 1 month 2 weeks ago
Joined: 06/02/2010
Posts: 594


A DDS application can find the process Ids of other DDS applications by reading the builtin Discovery Topics, specifically the ParticipantBuitinTopic. This forum thread describes how to read the buitin Topics. This is how RTI Admin Console does it.

There is no direct way to know the configuration profile that was used to start the RTI Routing Service. However by convention the RTI Routing Service sets the DomainParticipant EntityNameQosPolicy to the string "RTI Routing Service: <configuration profile name>" where <configuration profile name> is the name of the configuration profile specified when the routing service was started.  The problem is this is only a convention which we are planning to change in the future. And furthermore the EntityNameQosPolicy could be explicitly set in DomainParticipantQos which is also configurable via the routing service XML. So this approach would not be robust.

A more robust approach would be if you encoded the information yourself. For example adding your own property into the PropertyQosPolicy of the DomainParticipant and setting the propagate attribute to TRUE. This way you can see that Property in the ParticipantBuiltinTopicData which you get from reading the discovery PartiticipantBuiltinTopic