Dispose Instance In Persistence Service While Original Writer Down

1 post / 0 new
Offline
Last seen: 6 years 2 months ago
Joined: 01/03/2018
Posts: 14
Dispose Instance In Persistence Service While Original Writer Down

My scenario is as follows: I have a datawriter configured as transient durability and a persistence service running that will receive the data from the writer and store it in memory. The writer goes down before any datareader comes up aside from the one in the persistence service. Eventually a datareader comes up as a late joiner while the writer is down and gets the data from the persistence service. I would now like to dispose the instance from the application that received the message from the datareader.

I have two questions about this: 

1. I would like to know is there a way I can tell the persistence service I want to dispose the instance directly without having to create another DataWriter just for this purpose?

2. I have tried to look up the persistence service datawriter from the DomainParticipant directly so I could call dispose on it by using the lookup_datawriter_by_name() method but this returned null. Since I have been able to successfully get the handle to my own datawriters in other processes using this method, I'm curious as to why this won't work for the persistence service datawriter?  

 Thanks,

Jake