Dear Community,
I have a system of e.g. >10 DDS processes running on more than 3 physical computers. I also have many topics, but also a single particular topic is published and subscribed by multiple processes on those 3 computers.
Also to mention that those processes are CPU hungary, once fully launched, all CPUs go to near 100%.
Is there a way to make sure that all the DataReader and DataWriter discovered all its corresponding parties needed for the topic? Before I launch heavy computing tasks?
The reasone I am asking this is because I am encountering an issue I doubt might be related to Discovery: before, if I simply launch everything, then immediately CPUs reach high, and it seems that particular topic on a single computer node works fine (maybe via SHM it is low overhead), but that topic cannot go across different computer. e.g. the DataReader on the other computer nevet gets update, even with reliable QoS.
A solution seems to be working for me is I need to hold off my heavy computing tasks for a couple of second, I think during those seconds, the DataReaders and DataWriters discovers each other and assume desire QoS, then I start the heavy CPU part, it works fine. But this is my guess. Is there a way a DataReader can make sure it has established all the links to all its desired DataWriter? Then I can be sure my system will run eveny with under heavy CPU.
Thanks a lot,
Tao
I think I can answer this question myself. Found out you can use match_publications(reader) function call to find how many writers are there to this reader, you can ensure the correct list of writers are discovered then proceed.
Link here:
https://community.rti.com/static/documentation/connext-dds/6.1.0/doc/api/connext_dds/api_cpp2/classdds_1_1sub_1_1DataReader.html#a7c4dc52d235b3a6be17de6627919297e
Yes, this question is often asked, for examples here:
https://community.rti.com/forum-topic/detect-dds-inialization-complete
https://community.rti.com/howto/detect-presence-domainparticipants-datawriters-and-datareaders-dds-domain
This is a more complicated, but more comprehensive way to listen in on DDS discovery:
https://community.rti.com/examples/builtin-topics