Provides support to increase developer productivity in Java when using Redis, a key-value store. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
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
Is there a specific reason why annotation-based listeners are not currently supported for Redis Streams and Pub/Sub?
If not, are there any plans to introduce such functionality in future releases?
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
Questions