-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Feature request
Feature description
Currently, the API does not provide (or documents) a generic mechanism to wait for publishers (subscriptions) to match subscriptions (publishers) -- only the current match count is available for query. Thus, code that monitors these counts has to sleep and retry. That's inefficient and potentially brittle. It'd be nice to enable such waits.
Implementation considerations
It seems to me that a new pub/sub event would be the simplest solution. All Tier 1 RMW implementations have a form of pub/sub matching listener that can be leveraged:
- eProsima Fast-DDS has it, and both
rmw_fastrtps_cppandrmw_fastrtps_dynamic_cppalready use it (see here and here). - RTI Connext has it, and
rmw_connext_cppalready uses it (see here and here). - ADLINK CycloneDDS has it, but
rmw_cyclonedds_cppdoesn't use it yet (see here).
It's worth noting that some rcl tests appear to rely on pub/sub matching triggering the graph guard condition. Regardless of that not being true for any of the current Tier 1 RMW implementations, it seems to me that would create too many unwarranted awakes. Also, pub/sub matching does not imply a graph change.