vert-x3 / vertx-redis-client

Redis client for Vert.x
http://vertx.io
Apache License 2.0
128 stars 116 forks source link

Expose Cluster API for determining Correct Node for Key based on Slot #450

Closed pendula95 closed 1 month ago

pendula95 commented 3 months ago

From discussion here https://github.com/vert-x3/vertx-redis-client/pull/448#discussion_r1634373505 and need to determine slot distribution offline I propose to expose a function that will determine the correct node/slot to which cluster server command should be sent. This would be used as an utility, example correctly group commands for batch.

This function would save time as user would not need to execute additional commands like CLUSTER SLOTS as this information is already present and maintained in state of Vert.x Cluster Redis Driver.