I wanted to avoid sending OnJoin and OnLeave events to all clients, but when I set NotifyChannelOfSubscriptions to false clients do not receive any channel messages.
When not set, clients receive both subscriptions events and channel messages.
I’m having a problem how to detect on client side (dart) that serverevent stream is broken.
I know that this is most likely not related to ServiceStack, but maybe you would share any experience on this?
The behavior of gRPC proxy generated clients is beyond our control, but to help searching about it, in gRPC terminology the feature used to return the sever events is called “Server streaming RPC”:
In general the App-level technique to verify long-lived connections aren’t broken is to send heartbeats or keep-alives, i.e. clients sends a periodic heartbeats which if it doesn’t receive a response within a specific time period, the connection is considered broken and it auto reconnects to establish a new connection.
It’s a high-level App feature that I don’t expect to be implemented in client libraries since it requires spawning and managing a background thread or timer that has to auto reconnect your App’s client connections. But that’s the approach I’d personally take if I wanted to detect whether long-running persistent connections are still active.