Its difficult, almost impossible (the reason for the limited capabilities of the duplex SL). we implemented a list of users in our service, and we added the IsDisconnected property and LastCommunicationTime as soon as the WCF service receives a timeout when it tries to add a message to the user Outgoing-Message-Queue and fails and throws a timeout exception. we mark "IsDisconnecte = true" and the next time we do not try to send a message to this user.
Another thread continues to look at it, and if it notices that the LastCommunicationTime value is exceeded by the time value and IsDisconnected = true, it removes the user from the list if the same user does not try to reconnect during this period of time (which we identify by its UserId) .
There are so many things we did manually to deal with this problem as it made the WCF service so busy.
Mazhar Karimi
source share