Skip to content

Commit 6cf519b

Browse files
Refs #24125. Add documentation for writer side filtering on late joiners
Signed-off-by: Juan Lopez Fernandez <juanlopez@eprosima.com>
1 parent 0804cb0 commit 6cf519b

3 files changed

Lines changed: 77 additions & 1 deletion

File tree

code/ProDDSCodeTester.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#include <cstdint>
22

33
#include <fastdds/dds/domain/qos/DomainParticipantQos.hpp>
4+
#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
45
#include <fastdds/rtps/transport/ethernet/EthernetTransportDescriptor.hpp>
5-
#include <fastdds/rtps/transport/low-bandwidth/PayloadCompressionTransportDescriptor.hpp>
66
#include <fastdds/rtps/transport/low-bandwidth/HeaderReductionTransportDescriptor.hpp>
7+
#include <fastdds/rtps/transport/low-bandwidth/PayloadCompressionTransportDescriptor.hpp>
78
#include <fastdds/rtps/transport/udp_tsn/TSN_UDPv4TransportDescriptor.hpp>
89
#include <fastdds/rtps/transport/udp_tsn/UDPPriorityMappings.hpp>
910

@@ -451,3 +452,17 @@ void rpcdds_custom_scheduling_examples()
451452
};
452453
//!--
453454
}
455+
456+
void dds_domain_examples_pro()
457+
{
458+
{
459+
// CONTENT_FILTERING_ON_LATE_JOINERS_PROPERTY
460+
DataWriterQos wqos;
461+
462+
// Enable content filtering on late joiners for this DataWriter
463+
wqos.properties().properties().emplace_back(
464+
"fastdds.content_filtering_on_late_joiners",
465+
"true");
466+
//!--
467+
}
468+
}

code/ProXMLTester.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,29 @@
220220
</profiles>
221221
</dds>
222222
<-->
223+
<!--><-->
224+
225+
<!-->CONTENT_FILTERING_ON_LATE_JOINERS_PROPERTY<-->
226+
<!--
227+
<?xml version="1.0" encoding="UTF-8" ?>
228+
<dds>
229+
<profiles xmlns="http://www.eprosima.com">
230+
-->
231+
<data_writer profile_name="cft_on_late_joiners_xml_profile">
232+
<propertiesPolicy>
233+
<properties>
234+
<!-- Enable content filtering on late joiners -->
235+
<property>
236+
<name>fastdds.content_filtering_on_late_joiners</name>
237+
<value>true</value>
238+
</property>
239+
</properties>
240+
</propertiesPolicy>
241+
</data_writer>
242+
<!-->
243+
</profiles>
244+
</dds>
245+
<-->
223246
<!--><-->
224247

225248
</profiles>

docs/fastdds/dds_layer/topic/contentFilteredTopic/writerFiltering.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,41 @@ Publications made after the updated discovery information is received will use t
4949

5050
If some critical application considers this race condition issue unbearable, filtering on the writer side
5151
can be disabled by setting the maximum value on |WriterResourceLimitsQos::reader_filters_allocation-api| to 0.
52+
53+
.. _dds_layer_topic_contentFilteredTopic_writer_side_late_joiners:
54+
55+
Writer side filtering on late joiners |Pro|
56+
-------------------------------------------
57+
58+
By default, when a late joiner DataReader is discovered (non-volatile durability scenario), the DataWriter will not
59+
apply the filter for that DataReader on historical samples.
60+
This means that the late joiner DataReader will receive all historical samples, even those that would not match its
61+
filter, which could cause performance degradation on resource-limited systems.
62+
63+
It is possible however to configure a DataWriter to perform writer-side filtering on late joiners by setting the
64+
|DataWriterQos| property ``fastdds.content_filtering_on_late_joiners`` to ``true``.
65+
66+
.. list-table::
67+
:header-rows: 1
68+
:align: left
69+
70+
* - PropertyPolicyQos name
71+
- PropertyPolicyQos value
72+
- Default value
73+
* - ``"fastdds.content_filtering_on_late_joiners"``
74+
- ``bool``
75+
- ``false``
76+
77+
.. tab-set-code::
78+
79+
.. literalinclude:: /../code/ProDDSCodeTester.cpp
80+
:language: c++
81+
:start-after: // CONTENT_FILTERING_ON_LATE_JOINERS_PROPERTY
82+
:end-before: //!--
83+
:dedent: 8
84+
85+
.. literalinclude:: /../code/ProXMLTester.xml
86+
:language: xml
87+
:start-after: <!-->CONTENT_FILTERING_ON_LATE_JOINERS_PROPERTY<-->
88+
:end-before: <!--><-->
89+
:lines: 2-4,6-16,18-19

0 commit comments

Comments
 (0)