While we do take many precautions we are still occasionally leaking connections - an example redeploy of Socketshark showed 10% of DMS subscriptions are stale (e.g. do not have a corresponding subscription in Socketshark), and that's on top of us deleting subscriptions after 7 days.
This PR introduces an optional heartbeat mechanism so that the service can keep track of heartbeats and do its own cleanup if it wants to.
While we do take many precautions we are still occasionally leaking connections - an example redeploy of Socketshark showed 10% of DMS subscriptions are stale (e.g. do not have a corresponding subscription in Socketshark), and that's on top of us deleting subscriptions after 7 days.
This PR introduces an optional heartbeat mechanism so that the service can keep track of heartbeats and do its own cleanup if it wants to.