Use of same QOS file by both publisher and subscriber causes message to not be received

2 posts / 0 new
Last post
Offline
Last seen: 6 years 7 months ago
Joined: 08/25/2015
Posts: 5
Use of same QOS file by both publisher and subscriber causes message to not be received

I am having trouble with using the USER_QOS_PROFILES.xml file that is in the RTI DDS 5.1.1 Hello_idl example.

The behavior that I am seeing is that with no QOS file present for either program, the subscriber receives the messages from the publisher, but with this QOS file present in the directory where both programs are run, the subscription is matched and publisher appears to send the message successfully but the subscriber does not receive it.  If I run the subscriber with the QOS file present but the publisher with no QOS file, this also works.  Additionally, no QOS mismatch is reported.

I believe the problem is in the way I am building things, but it is hard to tell because everything builds and run properly.  I have tried building with the static (libnddscorez.a, libnddscz.a, libnddscppz.a) and dynamic (libnddscore.so, libnddsc.so, libnddscpp.so) libraries.  Both have the same effect.

I wrote my own example code to demonstrate this.  It builds with cmake (with cmake files borrowed and edited from the dds-temperature github project) and is attached in a .zip file.  The .xml file is included.  The README file explains how to build and run.

Edit: I have also copied in the code from the RTI DDS 5.1.1.1 Hello_simple example, and it displays the same behavior.

Any help with explaining this behavior would be appreciated.

(Edited for more details.)

Here is the simplest formulaton of my problem, without any of my code: I have noticed that, in the $NDDSHOME/example/CPP directory of RTI DDS 5.1.1, if I copy Hello_builtin/USER_QOS_PROFILES.xml to the directory in which I run the Hello_simple example, Hello_simple no longer works.  Why is that?

Offline
Last seen: 1 year 3 months ago
Joined: 05/23/2013
Posts: 64

Hi,

If you change the batch setting to "false", it will work.

<batch>
    <enable>false</enable>
</batch>


With the batch settings in the USER_QOS_PROFILES.xml, the publisher flushes batched data to the network when the size of a batch reaches 30KB. 
Therefore, with the Hello_simple example, you won't see any data until the size of sending data reaches 30KB. 
If you like to receive data more frequently with batching, you can reduce the configuration values in "max_data_bytes", "max_samples", or "max_flush_delay".

Thanks,
Kyoungho