valkey-io / valkey-glide

An open source Valkey client library that supports Valkey and Redis open source 6.2, 7.0 and 7.2. Valkey GLIDE is designed for reliability, optimized performance, and high-availability, for Valkey and Redis OSS based applications. GLIDE is a multi language client library, written in Rust with programming language bindings, such as Java and Python
Apache License 2.0
255 stars 53 forks source link

PubSub: Improve disconnections awareness #2164

Closed ikolomi closed 1 month ago

ikolomi commented 2 months ago

Describe the feature

The Glide PubSub model is build around the concept of automatic re-subscriptions in case of transport disconnects, which takes the burden of resubscribing off the client's code. The downside for that is client's code might not be aware of the disconnect events which might result in missed messages. Currently the message-extraction APIs do not provide such information and the only way to be aware of disconnections is through the logs.

Use Case

Glide-model pubsub with transport disconnects

Proposed Solution

This situations could be improved by one of the two extensions:

  1. (Preferred) Exposing events/counters to the client's code.
  2. Propagate the disconnect event through the message extraction APIs.

Other Information

No response

Acknowledgements

Client version used

1.0

Environment details (OS name and version, etc.)

all

ikolomi commented 1 month ago

Will be covered by the Open Telemetry integration