What is the difference between QueryConditions and ContentFilteredTopics?

RTI Connext supports two ways of filtering data: using QueryConditions and ContentFilteredTopics. These two options differ in the moment when DDS applies the filter.

  • QueryConditions filter data after the DataReader has received and queued it. That means that the application will receive all samples but only take those that match the query.
  • ContentFilteredTopics filter data during the exchange between the DataWriter and the DataReader, since the DataReader declares the subset it wants to receive.

Then, does the data filtering method affect the reception of data? It depends on the method.

  • QueryConditions don't affect the reception of data - i.e., the DataReader receives all samples.
  • Using ContentFilteredTopics does affect the reception of data, since the DataReader will be interested only in a subset of the samples. If the configuration1 allows writer-side filtering, the DataWriter will apply the filter and send only the samples that pass it. If not the DataReader will drop the samples that don't pass the filter before queuing them.

Summary table:

 Affect the reception of dataFilter on 
QueryConditionsNO: DataReader stores all samples and applies the filter on themLocally available (already received) data
ContentFilteredTopicsYES: DataReader stores only the subset of the samples that meet the filtering criteriaThe exchanged samples from the DataWriter to the DataReader

 

1. Where Filtering is Applied—Publishing vs. Subscribing Side