Enabling communication between SPDP and SPDP2 participants with Routing Service
Communication between participants using Simple Participant Discovery Protocol (SPDP) and Simple Participant Discovery Protocol 2.0 (SPDP2) is not possible by default. Both participant and endpoint discovery will fail to complete between an SPDP and SPDP2 participant. See Discovery Overview in the Core Libraries User's Manual for more information.
In future releases there will be a compatibility mode between the two protocols. Until then, it is possible to bridge the communication between SPDP and SPDP2 participants with a Routing Service. You simply need to create a Routing Service with a route between them.
The following XML snippet demonstrates how to add a route to a Routing Service configuration file to enable communication between SPDP and SPDP2 participants in the same domain. In the following example, the session “SPDP2_SPDP” allows communication from an SPDP2 participant to an SPDP participant, and the session “SPDP_SPDP2” allows communication from an SPDP participant to an SPDP2 participant. Both sessions are necessary to allow communication between participants and complete discovery.
<routing_service name="defaultSpdpSpdp2"> <annotation> <documentation> Routes all topics from SPDP participants to SPDP2 participants and the other way around in domain 0. </documentation> </annotation> <domain_route name="TwoWaySpdpSpdp2"> <participant name="SPDP2"> <domain_participant_qos> <transport_builtin> <mask>UDPv4</mask> </transport_builtin> <discovery_config> <builtin_discovery_plugins>SPDP2 | SEDP</builtin_discovery_plugins> <participant_liveliness_assert_period> <sec>1</sec> </participant_liveliness_assert_period> </discovery_config> </domain_participant_qos> <domain_id>0</domain_id> </participant> <participant name="SPDP"> <domain_participant_qos> <transport_builtin> <mask>UDPv4</mask> </transport_builtin> <discovery_config> <builtin_discovery_plugins>SPDP | SEDP</builtin_discovery_plugins> <participant_liveliness_assert_period> <sec>1</sec> </participant_liveliness_assert_period> </discovery_config> </domain_participant_qos> <domain_id>0</domain_id> </participant> <session name="SPDP2_SPDP"> <auto_topic_route name="SPDP2_SPDP"> <publish_with_original_info>true</publish_with_original_info> <input participant="SPDP2"> <creation_mode>ON_DOMAIN_AND_ROUTE_MATCH</creation_mode> <allow_topic_name_filter>*</allow_topic_name_filter> <allow_registered_type_name_filter>*</allow_registered_type_name_filter> <!-- Exclude monitoring, administration and logging topics --> <deny_topic_name_filter>rti/*</deny_topic_name_filter> </input> <output participant="SPDP"> <creation_mode>ON_DOMAIN_AND_ROUTE_MATCH</creation_mode> <allow_topic_name_filter>*</allow_topic_name_filter> <allow_registered_type_name_filter>*</allow_registered_type_name_filter> <!-- Exclude monitoring, administration and logging topics --> <deny_topic_name_filter>rti/*</deny_topic_name_filter> </output> </auto_topic_route> </session> <session name="SPDP_SPDP2"> <auto_topic_route name="SPDP_SPDP2"> <publish_with_original_info>true</publish_with_original_info> <input participant="SPDP"> <creation_mode>ON_DOMAIN_AND_ROUTE_MATCH</creation_mode> <allow_topic_name_filter>*</allow_topic_name_filter> <allow_registered_type_name_filter>*</allow_registered_type_name_filter> <deny_topic_name_filter>rti/*</deny_topic_name_filter> </input> <output participant="SPDP2"> <creation_mode>ON_DOMAIN_AND_ROUTE_MATCH</creation_mode> <allow_topic_name_filter>*</allow_topic_name_filter> <allow_registered_type_name_filter>*</allow_registered_type_name_filter> <deny_topic_name_filter>rti/*</deny_topic_name_filter> </output> </auto_topic_route> </session> </domain_route> </routing_service>
The attached XML file includes the full routing service configuration file needed to configure SPDP-to-SPDP2 communication, as well as an example demonstrating routing communication between SPDP and SPDP2 participants in different domains.
See also Configuring Routing Service.