Content Filtering / discovery

2 posts / 0 new
Last post
Last seen: 6 years 2 months ago
Joined: 07/19/2013
Posts: 3
Content Filtering / discovery



I am getting some unexpected behavior when starting up several apps that all subscribe to the same topic.  I am introducing content filtering to avoid having to check or filter in the code. Basically when a reader is created with a content filter, is it possible for on_data_available() to be called before the filter is applied (maybe discovery)?  In all my test drivers I am unable to recreate it but never works for me in the lab.  I have verified that CFT is applied by printing it out on destruction.  Also after a few seconds I am not able to force an update threw the filter.  Only right at discovery am I able to see a non filtered message get through.  Any thoughts?  Thank you in advance.

additional info from debug logs ....

Timestamp                event

16:23:52.324             on_subscription_match

16:23:52.326             on_data_available



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


I am confused about your debug logs. Which product and version are you using?

To answer your first question and assuming you are using regular Connext DDS (not Micro) if you create a a DataReader using a ContentFilteredTopic then no data should arrive to the DataReader that does not pass the filter. Note however that on_data_available() can be called for samples that do not contain data (for eample those that indicate an instance is no longer alive because it has been deleted or has no writers). This cases are distinguished because the valid_data member in the SampleInfo is set to false. Those can still go through the filter...