Hi Community,
For a project we are designing a progam that ask subscribers if they can do a certain activity. Therefore we have a 'Request' and 'Response' topic.
The subscribers only respond to the request when they can do the requested activity. So when 0 subscribers can do the activity, there will be no response in the 'Response' topic.
I've implemented the lifespan QoS so that requests automatically disappear. We don't want the subscribers responding to an old request.
But now the request program doesn't know when a sample is 'deleted'/disposed. Is there a way to get a callback/event from a disposed sample or instance?
I've found a previous question, but that one doesn't have an answer (https://community.rti.com/forum-topic/determining-lifespan-expired-samples-writer-side).
The program is written in C# with .NET/dotnet Framework version 4.6.1.
Thanks in advance!
Paul
To be clear, you're asking if the DataWriter sending the request can be notified when the request is deleted and removed from the DataWriter's send queue and/or the DataReader's receive queue? If so, then unfortunately, no.
A few concepts to clarify:
I also note that the only way that a DataReader would receive an "old" request, where "old" means that the request was sent before the DataWriter discovered (was connected) to the DataReader (perhaps because the DataReader was created after the DataWriter) is if you have configured the Durability QosPolicy to be non-VOLATILE. Otherwise, DataWriters do not send previously send data to newly discovered DataReaders.
--Howard