redis / lettuce

Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.
https://lettuce.io
MIT License
5.3k stars 949 forks source link

Add support for `SSUBSCRIBE` #2813

Closed atakavci closed 2 months ago

atakavci commented 3 months ago

implementation for #2758

built on existing routing/command mechanism with adding 2 new interfaces (RedisShardedPubSubListener, RedisClusterShardedPubSubListener) to avoid breaking existing use cases. need to add some more tests, including SPUBLISH command to check listeners are working properly.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 79.31034% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 77.66%. Comparing base (43843bf) to head (5616087). Report is 246 commits behind head on main.

Files Patch % Lines
...io/lettuce/core/cluster/PubSubClusterEndpoint.java 60.00% 2 Missing :warning:
...ore/cluster/pubsub/RedisClusterPubSubListener.java 0.00% 2 Missing :warning:
...core/cluster/pubsub/RedisClusterPubSubAdapter.java 0.00% 1 Missing :warning:
...ava/io/lettuce/core/pubsub/RedisPubSubAdapter.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2813 +/- ## ============================================ - Coverage 78.71% 77.66% -1.06% - Complexity 6786 7195 +409 ============================================ Files 508 539 +31 Lines 22765 24402 +1637 Branches 2446 2603 +157 ============================================ + Hits 17919 18951 +1032 - Misses 3717 4246 +529 - Partials 1129 1205 +76 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tishun commented 2 months ago

Looks good. For the final merge, we typically squash all commits into one to keep one commit per ticket. That works well with tickets that introduce separate commands. @tishun do you want me to merge this one or do you want to merge it?

Please go ahead and thank you for the review!

mp911de commented 2 months ago

That's squashed, merged, and polished now.