Open
Description
Describe the bug
This may not be considered a bug but a feature request... anyway, the streaming subscription functions don't recreate the grpc connection after unexpected client disconnections, resulting in the subscription to stop working while the user application has no way of detecting it or be notified.
The go sdk currently only prints this log
Error receiving messages from subscription pubsub=pubsub topic=footopic, closing subscription: rpc error: code = Unknown desc = error handling streaming subscription: api server closed
To Reproduce
- Run a sample application using
SubscribeWithHandler
orSubscribe
- verify the subscription receives messages
- shut down the dapr sidecar (easily doable if running dapr locally and running the app and the sidecar separately)
- notice the log message on the application and that it no longer can receive pubsub messages
Expected behavior
Similar to the grpc stream used in the Workflows API, I would expect the grpc connection for streaming subscriptions to be resilient and to be infinitely recreated until the user stops the subscription