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

Why doesn’t Spring Data Redis provide annotation-based listeners for Redis Streams and Pub/Sub? #3033

Closed
JiHongKim98 opened this issue Nov 5, 2024 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@JiHongKim98
Copy link

Issue Description

I'm curious why Spring Data Redis doesn’t offer an annotation-based listener mechanism for Redis Streams and Pub/Sub, similar to @KafkaListener in Spring Kafka. My thought is that having an annotation-based approach could make Redis Pub/Sub or Streams easier to use, particularly when using Redis as a messaging broker.

Example Scenario

public class SomeListenerClass {

    @RedisStreamListener(streamKey = "notification-stream")
    public void someHandleStreamMessage(MapRecord<String, String, String> message) {
        // ...
    }

    @RedisPubSubListener(channel = "alert-channel")
    public void someHandlePubSubMessage(String message) {
        // ...
    }
}

Questions

  1. Is there a specific reason why annotation-based listeners are not currently supported for Redis Streams and Pub/Sub?
  2. If not, are there any plans to introduce such functionality in future releases?
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 5, 2024
@mp911de
Copy link
Member

mp911de commented Nov 5, 2024

This is a duplicate of #2528 and #1004.

An annotation-driven framework requires a proper configuration and argument-resolver model.

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2024
@mp911de mp911de added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants