Attaching old subscribers (readers) and datawriters to new DomainParticipant

2 posts / 0 new
Last post
Offline
Last seen: 8 years 7 months ago
Joined: 12/11/2013
Posts: 4
Attaching old subscribers (readers) and datawriters to new DomainParticipant

Hi,

Is there a way to attach an older DataWriter/Subscribers to a new DomainParticipant? Basically, we have a scenario where we tear down a DomainParticipant and create a new DomainParticipant, but we want to preserve an history associated with the DataWriter and Readers.

I know that the DDS Persistence service is used to preserve history but this isn't something that we can use at this time. Is there any way to do this?

Thanks in advance,

-Stu

Gerardo Pardo's picture
Offline
Last seen: 21 hours 22 min ago
Joined: 06/02/2010
Posts: 601

Hello,

All Domain Entities: DataWriter, Publisher, DataReader, Subscriber are owned by the DomainParticipant where they were created when you delete a DomainParticipant you are destroying all the entities it contains.

That said there is one way to preserve the DataWriter cache (and any historical data there based on the DataWriter Qos). The means to do this is to use Durable Writer History. This is explained in Section 12.3 of the Connext DDS Users' Manual. Basically you can configure the DataWriter to use a file or data-base to store its "writer history". Then when you re-create the DataWriter on a different DomainParticipant you have to point to the file/database and privide the VGUID that identifies that DataWriter and it gets re-created with that same writer history.

There is not equivalent mechanism on the DataReader side. What you can do there is have it "remember" what it has received so it does not receive it again. This is done using the "Durable Reader State" feature in described in section 12.4. However this only persists sequence numbers not the actual data.

Can you explain your application use-case a bit more? Maybe if we understand it better we can come up with another alternative...

Gerardo