vertx-redis-client
vertx-redis-client copied to clipboard
Cluster mode (MOVED Exception)
Questions
I'm using the RedisClusterClient which communicates with AWS elasticache cluster with 3 shards + 1 replica per shard. While trying to write json value I'm getting this error:
ERROR [com.del.san.SanityCheckLambda] (vert.x-eventloop-thread-1) MOVED 5776 x.x.x.x:6379
Version
Which version(s) did you encounter this bug ?
4.3.7
Hi @OmerShemesh we don't have access to an AWS cluster, can you create a reproducer with TestContainers?
I am facing this same issue. using following dependency
<dependency> <groupId>io.vertx</groupId> <artifactId>vertx-redis-client</artifactId> <version>4.4.4</version> </dependency>
Any solution or workaround for this issue?
Do you maybe use Command.create(String)
to create an instance of command that is sent to the Redis cluster? I accidentally found out that we were doing that in Quarkus and it often results in MOVED
redirects because the created Command
is not key-aware and hence selecting the correct endpoint doesn't work correctly. That will be fixed (#413, #414), but until then, you should use the existing static instances of commands in Command
.
If you're not doing that, please ignore the previous paragraph. Does that happen during cluster resharding? For some reason, the Vert.x Redis client automatically handles the ASKED
redirect, but not MOVED
. I'm not sure why, but there must have been a reason. You can retry the command manually and the client should obtain the new cluster topology and route the command correctly.
If that's not a resharding situation either, could you please upload a reproducer somewhere?