12.6. Ignore Local Endpoints
By default, Fast DDS will automatically match all the endpoints (meaning DataReaders and DataWriters) belonging to a
given DomainParticipant as soon as they share the same Topic and have compatible Qos.
This however can result in undesired feedback whenever an application creates a DataReader and a DataWriter under
the same DomainParticipant on a shared Topic.
Although this feedback can be filtered out at the application level upon data reception by filtering out messages coming
from a DataWriter belonging to the same DomainParticipant on the DataReader receiving the data (by looking at the
GuidPrefix_t
), this entails for a data sample to go all the way to the DataReaderListener just to be discarded
by an overcomplicated application business logic.
For this reason, Fast DDS offers the possibility of instructing the DomainParticipant to avoid the matching of local
endpoints through the following property:
PropertyPolicyQos name |
PropertyPolicyQos value |
Default value |
---|---|---|
|
|
|
DomainParticipantQos participant_qos;
// Avoid local matching of this participant's endpoints
participant_qos.properties().properties().emplace_back(
"fastdds.ignore_local_endpoints",
"true");
<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com">
<profiles>
<participant profile_name="ignore_local_endpoints_domainparticipant_xml_profile">
<rtps>
<propertiesPolicy>
<properties>
<!-- Avoid local matching of this participant's endpoints -->
<property>
<name>fastdds.ignore_local_endpoints</name>
<value>true</value>
</property>
</properties>
</propertiesPolicy>
</rtps>
</participant>
</profiles>
</dds>
Note
An invalid value of fastdds.ignore_local_endpoints
results in the default behaviour.