Closed leonfg closed 4 years ago
Dear Fire God,
In your Pub and Sub, partition name is not set correctly (you have missed <element></element>
tag under name), hence, it uses default partition. Since both pub and sub are using default partition your sub application gets the data published by your pub application. This is correct behavior
In your second scenario, your subhello.py is using default partition, it gets data from sacpp_helloworld_pub.exe once you commented the partition code in cpp (because after commenting the sacpp_helloworld_pub.exe is using defalut partition). This is expected behavior.
You are facing the unexpected behavior because your partition name given in XML is not set in your application. To set partition name in your QoS_Profile.xml file, you must follow the following syntex:
<publisher_qos>
<partition>
<name>
<element>HelloWorld Partition</element>
</name>
</partition>
</publisher_qos>
For multi partition, Your Partition Qos in XML looks like:
<publisher_qos>
<partition>
<name>
<element>Partition1</element>
<element>Partition2</element>
</name>
</partition>
</publisher_qos>
For more details how to set different QoS in XML file, you can go through link below: http://download.prismtech.com/docs/Vortex/html/ospl/PythonDCPSAPIGuide/qos_provider.html#qos-provider
With best regards, Vivek Kumar Pandey Solutions Architect ADLINK Technology
Thank you very much!
Opensplice community 6.9.181127OSS. In my project I set pub and sub in different partition names in XML and they can still communicate with each other. Furthermore, subhello.py can receive data from sacpp_helloworld_pub.exe if I comment the partition name specification in cpp code. But setting same partition name with cpp in XML will not work.