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

Support for keyspace notifications #915

Open
vazois opened this issue Jan 14, 2025 · 2 comments
Open

Support for keyspace notifications #915

vazois opened this issue Jan 14, 2025 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@vazois
Copy link
Collaborator

vazois commented Jan 14, 2025

Feature request type

enhancement

Is your feature request related to a problem? Please describe

Keyspace notifications allow clients to subscribe to Pub/Sub channels in order to receive events affecting the Garnet data set in some way.

Describe the solution you'd like

We already have PubSub support, but it is only for user defined channels.
It will be nice to support keyspace notification as described here.

Describe alternatives you've considered

N/A

Additional context

No response

@MichaCo
Copy link

MichaCo commented Mar 2, 2025

Is this documented that this is not supported? Luckily I found this issue after wondering why my code isn't doing anything ;)

+1

joshua-siw added a commit to joshua-siw/garnet that referenced this issue Mar 9, 2025
added notify-keyspace-events option
@joshua-siw
Copy link

Hi, I am currently trying to implement this.
When sending keyspace notifications, a database ID should be provided. However, since Garnet only supports one database at the moment, would it be okay if I hardcode the value 0 for the DB ID?

I looked into how the SELECT command is implemented, hoping to find a variable that might be used in the future if multiple databases are supported, but couldnt find one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants