spring-projects / spring-projects/spring-data-redis

Allow adding specific keyspace/keyevent topic(s) with `KeyspaceEventMessageListener`

Open
#2,757 2 comments 0 reactions 1 assignee View on GitHub

@jxblum is already working on this.

Since Oct 26, 2023.

for: team-attention in:messaging type: enhancement
Dominant language
Java
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Redis allows for more specific psubscribe filters allowing for subscription to specific keys, or specific events as documented in https://redis.io/docs/manual/keyspace-notifications/

However, the Spring KeyspaceEventMessageListener subscribes to "__keyevent@*", which doesn't include keyspace events, and provides all events.

This requires the programmer to filter every event for both the event type, and the key to see if the event is actionable.

Can a mechanism be added such that a more finite subscription topic be specified, e.g. an overload constructor allows a topic String, or other Setter that can be specified, and then call afterProperties() or init()?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.