Closed malsbat closed 4 years ago
This only works if the published discovery message is a single topic (i.e. $DPS/Discovery in the unit test). In rmw_dps all the subscriber's topics are bundled as a union in the interests message (src/rmw_node.cpp:246), so it doesn't work there.
Good catch. After some more spelunking, it looks like https://github.com/intel/dps-for-iot/commit/bdd8141fd3d319bb30d69fb4a8780d1bfbed95f9#diff-c4222b6e4ae03ce423373dc35823ea63 is the change that introduced the regression by removing the needs component.
Prior to this fix, the match test checked if the subscription topics included the publication topics. This failed noticeably when the publication included the wildcarded topics.
With this fix, the correct check is performed (publication includes subscription) and the discovery code creates the link.
Signed-off-by: Todd Malsbary todd.malsbary@intel.com