Cannot configure publisher / subscriber on a partition

2 posts / 0 new
Last post
Offline
Last seen: 2 years 7 months ago
Joined: 02/14/2017
Posts: 5
Cannot configure publisher / subscriber on a partition

Hello,

I've been scavenging the documentation and user manual trying to make a complete picture in my head on how to configure a publisher / subscriber with a qos profile to talk on a partition. I've tried everything from creating a data writer as well as trying to create a profile but no luck. I've spent many hours trying to put all the pieces together. I'm hoping that someone can help me figure out how to write my xml so that it is publishing on topics on the right partition?

Specifically I'm trying to make my AddTargetRequest topic or message go out on the AddTargetRequestWriter to my partition called "SYSTEM-app" and "localhost.localdomain_8198_app". If you can please help guide me on how to specifically make this go to those 2 partitions that would be wonderful.

Thanks in advance. 

Here is my configure xml:

<?xml version="1.0"?>

<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/5.1.0/rti_dds_profiles.xsd" version="5.1.0">

<!-- Qos Library -->
<qos_library name="QosLibrary">
<qos_profile name="DefaultProfile"
base_name="BuiltinQosLibExp::Generic.StrictReliable"
is_default_qos="true">

<!-- Here we set two partitions the Publisher is going to be
member of: "ABC" and "foo" -->
<publisher_qos>
<partition>
<name>
<element>SYSTEM-app</element>
<element>localhost.localdomain_8198_app</element>
</name>
</partition>
</publisher_qos>

<!-- Here we set two partitions the Subscriber is going to
be member of: "ABC" and "X*Z" -->
<subscriber_qos>
<partition>
<name>
<element>SYSTEM-app</element>
<element>localhost.localdomain_8198_app</element>
</name>
</partition>
</subscriber_qos>

<participant_qos>
<transport_builtin>
<mask>UDPV4 | SHMEM</mask>
</transport_builtin>

<!-- Turn on monitoring -->
<!-- Begin Monitoring
<property>
<value>
<element>
<name>rti.monitor.library</name>
<value>rtimonitoring</value>
</element>
<element>
<name>rti.monitor.create_function_ptr</name>
<value>$(NDDS_MONITOR)</value>
</element>
</value>
</property>
End Monitoring -->
</participant_qos>

</qos_profile>
</qos_library>

<types>
<include file="TargetTasking.xml"/>
<struct name="ShapeType" extensibility="extensible">
<member name="color" stringMaxLength="128" id="0" type="string" key="true"/>
<member name="x" id="1" type="long"/>
<member name="y" id="2" type="long"/>
<member name="shapesize" id="3" type="long"/>
</struct>
<enum name="ShapeFillKind" extensibility="extensible">
<enumerator name="SOLID_FILL" value="0"/>
<enumerator name="TRANSPARENT_FILL" value="1"/>
<enumerator name="HORIZONTAL_HATCH_FILL" value="2"/>
<enumerator name="VERTICAL_HATCH_FILL" value="3"/>
</enum>
<struct name="ShapeTypeExtended" baseType="ShapeType" extensibility="extensible">
<member name="fillKind" id="4" type="nonBasic" nonBasicTypeName="ShapeFillKind"/>
<member name="angle" id="5" type="float"/>
</struct>
</types>

<!-- Domain Library -->
<domain_library name="MyDomainLibrary">
<domain name="MyDomain" domain_id="99">
<register_type name="ShapeType" kind="dynamicData" type_ref="ShapeType" />
<topic name="Square" register_type_ref="ShapeType"/>
<register_type name="ucs::MissionObjectivesService::AddTargetRequest" kind="dynamicData" type_ref="ucs::MissionObjectivesService::AddTargetRequest" />
<topic name="AddTargetRequest" register_type_ref="ucs::MissionObjectivesService::AddTargetRequest"/>
<register_type name="ucs::MissionObjectivesService::AddTargetResponse" kind="dynamicData" type_ref="ucs::MissionObjectivesService::AddTargetResponse" />
<topic name="AddTargetResponse" register_type_ref="ucs::MissionObjectivesService::AddTargetResponse"/>
<register_type name="ucs::MissionObjectivesService::GetTargetDataRequest" kind="dynamicData" type_ref="ucs::MissionObjectivesService::GetTargetDataRequest" />
<topic name="GetTargetDataRequest" register_type_ref="ucs::MissionObjectivesService::GetTargetDataRequest"/>
<register_type name="ucs::MissionObjectivesService::GetTargetDataResponse" kind="dynamicData" type_ref="ucs::MissionObjectivesService::GetTargetDataResponse" />
<topic name="GetTargetDataResponse" register_type_ref="ucs::MissionObjectivesService::GetTargetDataResponse"/>
</domain>
</domain_library>

<!-- Participant library -->
<participant_library name="MyParticipantLibrary">
<domain_participant name="Zero" domain_ref="MyDomainLibrary::MyDomain">

<publisher name="MyPublisher">
<data_writer name="MySquareWriter" topic_ref="Square" />
<data_writer name="AddTargetRequestWriter" topic_ref="AddTargetRequest" />
<data_writer name="GetTargetDataRequestWriter" topic_ref="GetTargetDataRequest" />
<data_writer name="GetTargetDataResponseWriter" topic_ref="GetTargetDataResponse" />
</publisher>

<subscriber name="MySubscriber">
<data_reader name="MySquareReader" topic_ref="Square" />
<data_reader name="AddTargetResponseReader" topic_ref="AddTargetResponse" />
<data_reader name="GetTargetDataResponseReader" topic_ref="GetTargetDataResponse" />
</subscriber>

</domain_participant>
</participant_library>
</dds>

Like I said I read all about this but cannot connect all the dots. I see the explanation here for example but I cannot translate this to xml:

https://community.rti.com/static/documentation/connext-dds/5.2.3/doc/manuals/connext_dds/html_files/RTI_ConnextDDS_CoreLibraries_UsersManual/Content/UsersManual/PARTITION_QosPolicy.htm

I'm confused by the naming conventions as well as how to actually properly configure a profile or data writer to talk to a partition like the image there. In the manual I found something like:

<datareader_qos name="HelloWorld_reader_qos" base_name="qosLibrary::DefaultProfile">

for the data writer / reader in the hopes that it would talk to a partition but no luck. As you see above currently I tried to make a qos publisher but no luck with that either. I do see this message going out as I'm using the rti admin tool. I see my message being published as I'm subscribing to the topic but the service that is listening on the partitions above is not picking up the message. The service is supposed to capture the message on the partition and insert into the database and I have not seen anything go into the database yet.

Thanks so much,

JJ

sara's picture
Offline
Last seen: 2 months 3 weeks ago
Joined: 01/16/2013
Posts: 122

Hi JJ,

Have you taken a look at our community example on partitions: https://community.rti.com/examples/partitions ?
It seems you are using XML App Creation. I created a small example with Prototyper from 5.2.3 and worked. 

 
<!--
RTI Data Distribution Service Deployment
-->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="http://community.rti.com/schema/5.2.3/rti_dds_profiles.xsd" 
 version="5.2.3">
 
 <!-- Qos Library -->
 <qos_library name="qosLibrary">
 <qos_profile name="MyProfile" 
base_name="BuiltinQosLibExp::Generic.StrictReliable"
is_default_qos="true">
<!-- Here we set two partitions the Publisher is going to be
member of: "ABC" and "foo" -->
<publisher_qos>
<partition>
<name>
<element>SYSTEM-app</element>
<element>localhost.localdomain_8198_app</element>
</name>
</partition>
</publisher_qos> <!-- Here we set two partitions the Subscriber is going to
be member of: "ABC" and "X*Z" -->
<subscriber_qos>
<partition>
<name>
<element>SYSTEM-app</element>
<element>localhost.localdomain_8198_app</element>
</name>
</partition>
</subscriber_qos>
 </qos_profile>
 </qos_library><!-- types -->
 <types>
 <struct name="ShapeType" extensibility="extensible">
 <member name="color" stringMaxLength="128" id="0" type="string" key="true"/>
 <member name="x" id="1" type="long"/>
 <member name="y" id="2" type="long"/>
 <member name="shapesize" id="3" type="long"/>
 </struct>
 <enum name="ShapeFillKind" extensibility="extensible">
 <enumerator name="SOLID_FILL" value="0"/>
 <enumerator name="TRANSPARENT_FILL" value="1"/>
 <enumerator name="HORIZONTAL_HATCH_FILL" value="2"/>
 <enumerator name="VERTICAL_HATCH_FILL" value="3"/>
 </enum>
 <struct name="ShapeTypeExtended" baseType="ShapeType" extensibility="extensible">
 <member name="fillKind" id="4" type="nonBasic" nonBasicTypeName="ShapeFillKind"/>
 <member name="angle" id="5" type="float"/>
 </struct>
 </types><!-- Domain Library -->
 <domain_library name="ShapesDomainLibrary" ><domain name="ShapesDomain" domain_id="38">
 <register_type name="ShapeType" kind="dynamicData" type_ref="ShapeType" />lt;topic name="Square"
 register_type_ref="ShapeType"/>
 </domain>
 </domain_library><!-- Participant library -->
 <participant_library name="ShapesParticipantLibrary">
 <domain_participant name="PublicationParticipant" domain_ref="ShapesDomainLibrary::ShapesDomain">
 <publisher name="MyPublisher">
 <data_writer name="HelloWorldWriter" topic_ref="Square">
 </data_writer>
 </publisher>
 </domain_participant>
 
 <domain_participant name="SubscriptionParticipant" domain_ref="ShapesDomainLibrary::ShapesDomain">  
 <subscriber name="MySubscriber">
 <data_reader name="HelloWorldReader"  topic_ref="Square">
 </data_reader>
 </subscriber>
 </domain_participant>
 
 </participant_library>
</dds> 

 

And I could see the partitions correctly created in Admin Console:

Admin Console partitions

Could you give it a try?


Thanks,
Sara