Class ReactiveRedisMessageListenerContainer

java.lang.Object
org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer
All Implemented Interfaces:
DisposableBean

public class ReactiveRedisMessageListenerContainer extends Object implements DisposableBean
Container providing a stream of ReactiveSubscription.ChannelMessage for messages received via Redis Pub/Sub listeners. The stream is infinite and registers Redis subscriptions. Handles the low level details of listening, converting and message dispatching.

Note the container allocates a single connection when it is created and releases the connection on destroy(). Connections are allocated eagerly to not interfere with non-blocking use during application operations. Using reactive infrastructure allows usage of a single connection due to channel multiplexing.

This class is thread-safe and allows subscription by multiple concurrent threads.

Since:
2.1
Author:
Mark Paluch, Christoph Strobl
See Also: