README.md in redis-client-0.14.1 vs README.md in redis-client-0.15.0

- old
+ new

@@ -341,10 +341,14 @@ # no new message was received in the allocated timeout end end ``` +*Note*: pubsub connections are stateful, as such they won't ever reconnect automatically. +The caller is resonsible for reconnecting if the connection is lost and to resubscribe to +all channels. + ## Production ### Instrumentation and Middlewares `redis-client` offers a public middleware API to aid in monitoring and library extension. Middleware can be registered @@ -436,9 +440,11 @@ redis_config = RedisClient.config(reconnect_attempts: 3) redis = redis_config.new_client redis.call("GET", "counter") # Will be retried up to 3 times. redis.call_once("INCR", "counter") # Won't be retried. ``` + +**Note**: automatic reconnection doesn't apply to pubsub clients as their connection is stateful. ### Exponential backoff Alternatively, `reconnect_attempts` accepts a list of sleep durations for implementing exponential backoff: