I have implemented a subscribe pattern RPC with gRPC (
rpc SubscribeX(SubscribeXRequest) returns (stream X)
) using grpc-go. In the client, I want to resubscribe if there is a problem with the connection. I'm not sure if I should use their backoff mechanism (now called ConnectParams
) when creating the channel, or it wouldn't let me resubscribe when it reconnects. Is there a way to listen on ClientConn
state changes? A recommended way of implementing it? Or an example for a similar usage pattern?