-
Notifications
You must be signed in to change notification settings - Fork 336
Pubsub does not auto-reconnect with get_message() #1130
Comments
This is great code, but I believe we had a discussion before about how this was not the job of redis-py or aioredis. In my personal belief, I agree with this since people may want to be able to have a custom implementation for server failing. |
Currently when a connection breaks, There's even a whole connect callback that will resubscribe to all subscribe topics upon reconnection, so obviously the implementation is meant to reconnect. |
I don't see where |
Maybe "reconnect" is the wrong word. All I'm not sure what |
FWIW, the equivalent issue+PR I opened with redis-py has been merged. redis/redis-py#1572 |
@luhn apologies, I never had a chance to respond, especially after I made sense of "Maybe "reconnect" is the wrong word". Thanks for also linking to redis-py. I'll probably be skipping your PR since I'll be making a huge PR port from redis-py tomorrow. Thanks for creating the issue though! |
Auto-reconnect PubSub on get_message (redis/redis-py#1574) * Thank you Theron Luhn <@luhn>!!! * Fixes #1130 Signed-off-by: Andrew-Chen-Wang <acwangpython@gmail.com>
Counterpart of redis/redis-py#1572
Run the following script:
While running, stop the Redis server and then start it again.
Expected behavior:
publish()
andget_message()
will fail while server is stopped, then succeed again after server restarts.Observed behavior:
publish()
resumes working, butget_message()
continues to fail with the following traceback:The text was updated successfully, but these errors were encountered: