DDS Secure settings for get_matched_subscriptions?

5 posts / 0 new
Last post
Offline
Last seen: 3 weeks 4 days ago
Joined: 02/22/2021
Posts: 4
DDS Secure settings for get_matched_subscriptions?

Hi, would like to check, if I have configured DDS Secure for my dds connection, is there any configuration that I need to take note such that get_matched_subscriptions/get_matched_publication method can work?

I am able to get result for this method if I did not enable Security Plugin, however when I immediately enable it back via DDS Qos and restarted, I am not able to get any result even though the setup is the same.

Howard's picture
Offline
Last seen: 4 hours 14 min ago
Joined: 11/29/2012
Posts: 211

So, get_matched_subscriptions/publicatons() are invoked after DDS discovers (and matches) other DDS participants successfully...this happens with and without the DDS Security plugins enabled.

If you're not seeing them being invoked, it means that your DDS Security plugins isn't configured to allow the local DDS participant to successfully discover and/or match the datawriters/datareaders of other DDS participants.

You'll need to check your security configuration (XML and cert and key and governance/permissions).  You can turn on the logging to a higher verbosity to see if there are any messages that can tell you what's wrong.

krd
Offline
Last seen: 3 weeks 4 days ago
Joined: 05/19/2021
Posts: 2

As Howard mentioned, first check if your security plugin configuration is correct and if participants in your system are able to communicate. There is a helpful guide which details the configuration process, I highly recommend reading it: 6.0.1 or 6.1.0 (if you are using our latest release)


If you are still experiencing the problem, can you share more information about the situation? What version are you using? Have you noticed any other issues? Are you able to successfully communicate with security enabled? When do you call get_matched_subscription (please allow some time for paricipants to discover each other)? 

Offline
Last seen: 3 weeks 4 days ago
Joined: 02/22/2021
Posts: 4

Thanks all for the help, found a temporary fix. I am using version 6.0.1.

I think it could be because DDS Security takes a bit more time to finish preparation (maybe this is where it is trying to discover other participants too?) as my previous code immediately tried to invoke get_matched_subscriptions() once I have created my dds request/reply. My temporary fix is to give about 3-5 seconds between creation of my dds request/reply and invoking of get_matched_subscriptions().

krd
Offline
Last seen: 3 weeks 4 days ago
Joined: 05/19/2021
Posts: 2

Correct, discovery is performed as soon as you spawn and configure your participant and then periodically to check for changes.

As you noticed, security inevitably increases resource consumption. However, the performance of security plugins was significantly improved in the recent release 6.1.0, you may want to consider an update especially if you are building a large system. Naturally, with growing scale you will see more and more time required to complete some tasks. For this reason, I suggest replacing calling get_matched_subscriptions and adding delay with implementing an asynchronous application, using waitsets (or listeners in some sppecial cases) that will react to events of interests, like newly discovered participants. This way you will end up with a better-performing and more robust system.