I have a WCF Service Application that publishes information to various subscribers on different computers. The subscribers are in client applications which can dynamically subscribe and unsubscribe. When subscribing, I dispose of the subscription in the IDisposable.Dispose() method, so it should unsubscribe safely on disposal.
But what if the client application suddenly shuts down, and I am unable to properly dispose of the subscriber? Does that leave any references to the subscriber hanging on the publisher side? Or should I not worry about this at all?
EDIT:
Let me rephrase. Let's say you have a publisher/subscriber model via duplex messaging patterns on a WCF. How do you design it in such a way that the program is safe even when the client unexpectedly shuts down?
Anotherwords, how does the publisher know that the subscriber(client) is dead, so that it can unsubscribe the subscription?