Comments (5)
I think this is intentional. When we SUBSCRIBE
, we don't know to which node we're connected, it is selected randomly. So when we want to UNSUBSCRIBE
, we need to execute that command on all nodes.
from vertx-redis-client.
Yeah, that makes sense to me, a single request to each node. I believe that currently, it sends N times for the same node, where N is the number of slots a node owns.
It looks like in cluster mode from version 7+, pub/sub goes to a slot owner (https://redis.io/docs/interact/pubsub/#sharded-pubsub).
from vertx-redis-client.
Sharded pub/sub is done using SSUBSCRIBE
, SUNSUBSCRIBE
and SPUBLISH
, so that's a different thing. What you have is not sharded. (I recently made a change where the sharded pub/sub commands are treated similarly to classic pub/sub, which was probably a mistake I made without understanding sharded pub/sub properly. I will have to revisit it.)
It seems super unlikely that we would send the command once for each slot, because the number of slots in Redis cluster is 16K. In the reproducing test you made, the cluster has 3 nodes, so I would expect the UNSUBSCRIBE
command to be send 3x and hence there would be 3 responses to it. The total number of received messages in the test should IMHO be 5.
from vertx-redis-client.
Yeah, that's it. Coming back to the test now:
received msg [subscribe, sub-unsub, 1]
received msg [message, sub-unsub, hello]
received msg [unsubscribe, sub-unsub, 0]
received msg [unsubscribe, sub-unsub, 0]
received msg [unsubscribe, sub-unsub, 0]
One for each node. I believe we can safely close this one. Thanks for the help, and sorry about the noise.
from vertx-redis-client.
Sure thing, thanks for the confirmation!
from vertx-redis-client.
Related Issues (20)
- Pick the protocol from the url if provided HOT 1
- Create too many connections to server HOT 4
- Cluster mode (MOVED Exception) HOT 3
- The vertx redis reconnection demo introduced at docs cannot work in the case when redis instances shutdown and get back to ready. HOT 4
- Align Redis deprecations with RedisAPI methods
- hight cpu usage after pressure test HOT 6
- redis client shared in multiple verticles in high concurrency load will make redis call get response belonged to another request with some specific keys HOT 7
- Seeing unhandled exception when client reacts to sentinel failover HOT 2
- Getting io.vertx.core.impl.NoStackTraceThrowable: Cannot connect to any of the provided endpoints Error while trying to connect to redis in replication mode HOT 4
- which situation will make RedisStandaloneConnection message handler a null value HOT 1
- RedisClusterClient gives much higher load to first healthy node HOT 18
- always have the "Redis waiting Queue is full" error
- Missing connection with endpoint fallback in cluster connection HOT 2
- Getting different result when executing `FT.SEARCH` when using `redis/redis-stack:7.0.6-RC8` vs `redis/redis-stack-server:7.2.0-v5`. (Multi is a Map) HOT 6
- How to catch io.vertx.core.impl.NoStackTraceThrowable HOT 4
- [RedisConnectionManager] io.netty.channel.StacklessClosedChannelException throwed HOT 1
- Command.XREADGROUP error MOVED HOT 9
- Expose more properties through CommandReporter
- Support for FalkorDB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vertx-redis-client.