From 6cf519bfabdfd4281614c7dd5238fe0bbec92d38 Mon Sep 17 00:00:00 2001 From: Juan Lopez Fernandez Date: Tue, 21 Jul 2026 09:44:21 +0200 Subject: [PATCH] Refs #24125. Add documentation for writer side filtering on late joiners Signed-off-by: Juan Lopez Fernandez --- code/ProDDSCodeTester.cpp | 17 ++++++++- code/ProXMLTester.xml | 23 +++++++++++ .../contentFilteredTopic/writerFiltering.rst | 38 +++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/code/ProDDSCodeTester.cpp b/code/ProDDSCodeTester.cpp index 4ff4063fc..cb9671d7d 100644 --- a/code/ProDDSCodeTester.cpp +++ b/code/ProDDSCodeTester.cpp @@ -1,9 +1,10 @@ #include #include +#include #include -#include #include +#include #include #include @@ -451,3 +452,17 @@ void rpcdds_custom_scheduling_examples() }; //!-- } + +void dds_domain_examples_pro() +{ + { + // CONTENT_FILTERING_ON_LATE_JOINERS_PROPERTY + DataWriterQos wqos; + + // Enable content filtering on late joiners for this DataWriter + wqos.properties().properties().emplace_back( + "fastdds.content_filtering_on_late_joiners", + "true"); + //!-- + } +} diff --git a/code/ProXMLTester.xml b/code/ProXMLTester.xml index ab41973f5..fea27a8a4 100644 --- a/code/ProXMLTester.xml +++ b/code/ProXMLTester.xml @@ -220,6 +220,29 @@ <--> +<--> + +CONTENT_FILTERING_ON_LATE_JOINERS_PROPERTY<--> + + + + + + + fastdds.content_filtering_on_late_joiners + true + + + + + + + +<--> <--> diff --git a/docs/fastdds/dds_layer/topic/contentFilteredTopic/writerFiltering.rst b/docs/fastdds/dds_layer/topic/contentFilteredTopic/writerFiltering.rst index 52f19270b..1f7fe56e8 100644 --- a/docs/fastdds/dds_layer/topic/contentFilteredTopic/writerFiltering.rst +++ b/docs/fastdds/dds_layer/topic/contentFilteredTopic/writerFiltering.rst @@ -49,3 +49,41 @@ Publications made after the updated discovery information is received will use t If some critical application considers this race condition issue unbearable, filtering on the writer side can be disabled by setting the maximum value on |WriterResourceLimitsQos::reader_filters_allocation-api| to 0. + +.. _dds_layer_topic_contentFilteredTopic_writer_side_late_joiners: + +Writer side filtering on late joiners |Pro| +------------------------------------------- + +By default, when a late joiner DataReader is discovered (non-volatile durability scenario), the DataWriter will not +apply the filter for that DataReader on historical samples. +This means that the late joiner DataReader will receive all historical samples, even those that would not match its +filter, which could cause performance degradation on resource-limited systems. + +It is possible however to configure a DataWriter to perform writer-side filtering on late joiners by setting the +|DataWriterQos| property ``fastdds.content_filtering_on_late_joiners`` to ``true``. + +.. list-table:: + :header-rows: 1 + :align: left + + * - PropertyPolicyQos name + - PropertyPolicyQos value + - Default value + * - ``"fastdds.content_filtering_on_late_joiners"`` + - ``bool`` + - ``false`` + +.. tab-set-code:: + + .. literalinclude:: /../code/ProDDSCodeTester.cpp + :language: c++ + :start-after: // CONTENT_FILTERING_ON_LATE_JOINERS_PROPERTY + :end-before: //!-- + :dedent: 8 + + .. literalinclude:: /../code/ProXMLTester.xml + :language: xml + :start-after: CONTENT_FILTERING_ON_LATE_JOINERS_PROPERTY<--> + :end-before: <--> + :lines: 2-4,6-16,18-19