lettuce
lettuce copied to clipboard
Fix sharded pubsub auto-resubscription after Redis cluster rebalancing
Make sure that:
- [x] You have read the contribution guidelines.
- [x] You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
- [x] You applied code formatting rules using the
mvn formatter:formattarget. Don’t submit any formatting related changes. - [x] You submit test cases (unit or integration tests) that back your changes.
Summary
Fixes missing auto-resubscription for Sharded Pub/Sub after Redis cluster rebalancing.
Issues
- No resubscribe mechanism on slot movement (https://github.com/redis/lettuce/issues/3213)
Fixes
- Introduced ShardedPubSubAutoResubscribeListener for automatic resubscribe
- Tracked intentional unsubscribes in async/reactive sunsubscribe
- Leveraged existing cluster redirection for reconnection
Result
Sharded Pub/Sub subscriptions now automatically resubscribe on slot rebalancing while preserving intentional client unsubscribe behavior.
@tishun // Hi, I noticed this PR is marked for 7.0.0.RELEASE. Just wondering if there’s anything I can do to help move this forward?
Best,