Is there a way to tell if an RV inbox has a valid, active endpoint?
I have a system where clients create RV Inboxes. These are then passed to other components in the system which can use the Inbox to send messages to the client.
I would like a Monitor process in my system to know if a client has died. The Monitor will have the client Inbox.
I can implement a heartbeating mechanism, but I wonder if there is a mechanism within RV which can tell me whether the Inbox is still valid - ie, whether messages sent on it will be routed to an active client.
I guess that RV itself must know this - as it will know whether it can send a message to the Inbox or not. Is there a way for my code to be able to access this information, or to make a test about whether an Inbox is valid at a given time?
(Not really answering my own question - this is from a work colleague.)
I came across this when I was working on an RV bridge that we had to write last year, as it was proxying and rewriting inboxes. It turns out RV creates “throwaway” inboxes for certain operations (the blocking ones), and no message is sent (on that multicast, anyway) to say that the inbox is gone. The way inboxes work seems to be that:
In other words, it’s the receiving daemon which has to discard messages sent on closed inboxes, and there is no equivalent to the “LISTEN.STOP” messages that accompany regular subscription ends.