Get all instances in history for late joining subscribers

5 posts / 0 new
Last post
Offline
Last seen: 1 week 6 days ago
Joined: 06/01/2021
Posts: 2
Get all instances in history for late joining subscribers

I am trying to write a writer and reader

where the writer application starts writing before the reader registers

i want the reader to get all of the instances that were written by the writer

in the writer, i registered all of the instances without unregistering

I am using:

TRANSIENT_LOCAL_DURABILITY_QOS

RELIABLE_RELIABILITY_QOS

KEEP_ALL_HISTORY_QOS

<max_samples>LENGTH_UNLIMITED</max_samples>
<max_instances>LENGTH_UNLIMITED</max_instances>

 

i put this both in the writer and reader

 

but i get only the instances that were written after the reader subscribed

i tried to understand what is going with verbose but it gave me no information 

how can this be done

 

Offline
Last seen: 1 week 3 days ago
Joined: 08/09/2017
Posts: 21

What you are doing should work. If it doesn't work, then chances are that the applications are not actually using these QoS settings. I suggest using AdminConsole to verify the QoS of the applications after you start them.

Offline
Last seen: 1 week 6 days ago
Joined: 06/01/2021
Posts: 2

if i change something (make an error in the xml) it fails so i know it is using the file

is there such an exmple that i can use?

sara's picture
Offline
Last seen: 16 hours 54 min ago
Joined: 01/16/2013
Posts: 128

Hi, 

Apart from making sure that the XML is parsed, are you loading the profile when creating the DataReader/DataWriter? You can use this API: https://community.rti.com/static/documentation/connext-dds/6.1.0/doc/api/connext_dds/api_cpp/classDDSDomainParticipant.html#a1dfc973d55df91133acf38dae69963ad

And the equivalent for DataWriters :)
Best regards,
Sara

Howard's picture
Offline
Last seen: 4 hours 12 min ago
Joined: 11/29/2012
Posts: 211

Making sure that the XML is being loaded is a necessary but not sufficient condition....

You should also make sure that the QoS Profile is actually being used to create your DDS Entities.  I suggest using the create_xxx_with_profile() versions of the create methods to create DataWriters/DataReaders with specific profiles.  In that way, you know that it was created with a specific profile...and if the profile wasn't defined (because it wasn't loaded), you'll know that right away.