Python (Connector) Subscriber - Subscribe to Java Example

3 posts / 0 new
Last post
Last seen: 5 years 11 months ago
Joined: 10/26/2017
Posts: 2
Python (Connector) Subscriber - Subscribe to Java Example


I have been working with the hello_idl example in the rti_workspace->examples->connext_dds->java.

I want to write a subscriber in Python that can listen to the java publisher. But so far I haven't gotten it to work. What do I need to change in the .xml to be able to listen to the java publisher.

I tried to follow the steps in this post:

I get it to work fine with for instance the "hello_world_xml_dynamic" example. Then I can simply use the attached "USER_QOS_PROFILES.xml" . Is there something similair for the hello_idl exmaple? The "USER_QOS_PROFILES.xml" for the hello_idl examples, look totally different, and I can not find the relevant names.



XML Snapshot





ajimenez's picture
Last seen: 1 year 3 months ago
Joined: 09/29/2017
Posts: 21

Hi Magnus,

I could communicate a publisher running Java and a Subscriber running rticonnextdds-connector.

The XML configuration that I have used in for the Subscriber is:

<!-- types -->
<types xmlns:xsi="">
    <const name="HELLODDS_MAX_PAYLOAD_SIZE" type="int32" value="8192"/>
    <const name="HELLODDS_MAX_STRING_SIZE" type="int32" value="64"/>
    <struct name= "HelloWorld">
        <member name="prefix" stringMaxLength="HELLODDS_MAX_STRING_SIZE" type="string"/>
        <member name="sampleId" type="int32"/>
        <member name="payload" sequenceMaxLength="HELLODDS_MAX_PAYLOAD_SIZE" type="byte"/>

<!-- Domain Library -->
<domain_library name="MyDomainLibrary">
    <domain name="MyDomain" domain_id="0">
        <register_type name="HelloWorld" type_ref="HelloWorld" />
        <topic name="Hello IDL" register_type_ref="HelloWorld"/>

<!-- Participant library -->
<domain_participant_library name="MyParticipantLibrary">
    <domain_participant name="Zero" domain_ref="MyDomainLibrary::MyDomain">
        <subscriber name="MySubscriber">
            <data_reader name="MyHelloIDL" topic_ref="Hello IDL" />

Find attached the python subscriber and the XML configuration.

Could you please try it and see if it is working?

In the case that it is not working, please try to check with RTI Administration Console if the topics match or not.

Thank you.


Last seen: 5 years 11 months ago
Joined: 10/26/2017
Posts: 2

Thank you Antonio!

That worked perfectly. I am not so familiar with RTI DDS yet, but thank you for the tip about using the RTI Admin Console, that helped too.

Best regards,