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
Hi,
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 aContentFilteredTopic
then no data should arrive to theDataReader
that does not pass the filter. Note however thaton_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 thevalid_data
member in theSampleInfo
is set tofalse
. Those can still go through the filter...Gerardo
Gerardo