For Pub sub cluster using the io.lettuce.core.pubsub.PubSubCommandArgs, due which does not make use of hash and does not distribute the channels across shards #2555
Labels
status: duplicate
A duplicate of another issue
Bug Report
For Pub sub cluster using the io.lettuce.core.pubsub.PubSubCommandArgs,
And in this below overridden method, which always return null key
@OverRide
public ByteBuffer getFirstEncodedKey() {
return null;
}
due which does not make use of hash key and does not distribute the data(channel subscription) across the shards.
Current Behavior
ClusterDistributionChannelWriter -->
ByteBuffer encodedKey = args.getFirstEncodedKey(); // this gets called to identify the encoded key, however due to PubSubCommandArgs above behaviour its always return null and complete data(channel subscription) goes to one shard only.
Expected behavior/code
Pubsub should make use of CommandArgs instead of PubSubCommandArgs Or should provide a option to override this.
Environment
Possible solutions
RedisPubSubReactiveCommandsImpl -- a option can be provided to pass CommandArgs while creating cluster client as a client options.
The text was updated successfully, but these errors were encountered: