Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUBSUB NUMSUB inconsistency in cluster mode #853

Open
JrooTJunior opened this issue Jul 22, 2024 · 0 comments
Open

PUBSUB NUMSUB inconsistency in cluster mode #853

JrooTJunior opened this issue Jul 22, 2024 · 0 comments

Comments

@JrooTJunior
Copy link

I'm currently using KeyDB in cluster mode and have encountered an issue with the PUBSUB NUMSUB command. While PUBLISH and SUBSCRIBE commands work correctly in cluster mode, PUBSUB NUMSUB provides inconsistent results depending on which node my service communicating with.

My use case:

  • I need to use the PubSub mechanism in cluster mode.
  • I use PUBSUB NUMSUB to detect if specified channels are open.

Problem:

The PUBSUB NUMSUB command returns different results based on the node being queried, leading to unreliable channel status information across the cluster.

Context:

I understand that Redis 7 introduced new commands (SPUBLISH, SSUBSCRIBE, PUBSUB SHARDNUMSUB) to address this issue in cluster mode. However, since KeyDB is based on Redis 6, these commands are not available.

Request for assistance:

I'm seeking guidance on how to resolve this issue in KeyDB. Possible solutions I'm considering:

  1. Is there a way to modify PUBSUB NUMSUB behavior to provide consistent results across all nodes in the cluster?
  2. Could new commands similar to those in Redis 7 be added to KeyDB to handle this situation correctly?
  3. Are there any other workarounds or solutions you can suggest for my use case?

Any insights or recommendations would be greatly appreciated. I'm open to exploring different approaches to ensure reliable PubSub functionality in my KeyDB cluster setup.

Thank you for your time and assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant