spring-projects / spring-projects/spring-data-redis
Allow adding specific keyspace/keyevent topic(s) with `KeyspaceEventMessageListener`
@jxblum is already working on this.
Since Oct 26, 2023.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.