@@ -97,10 +97,16 @@ public interface ReactiveRedisOperations<K, V> {
9797
9898 /**
9999 * Subscribe to the given Redis {@code channels} and emit {@link Message messages} received for those.
100+ * <p>
101+ * Note that this method allocates a new
102+ * {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} and uses a dedicated
103+ * connection, similar to other methods on this interface. Invoking this method multiple times is an indication that
104+ * you should use {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} directly.
100105 *
101106 * @param channels must not be {@literal null}.
102107 * @return a hot sequence of {@link Message messages}.
103108 * @since 2.1
109+ * @see org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer
104110 */
105111 default Flux <? extends Message <String , V >> listenToChannel (String ... channels ) {
106112
@@ -112,10 +118,16 @@ default Flux<? extends Message<String, V>> listenToChannel(String... channels) {
112118 /**
113119 * Subscribe to the Redis channels matching the given {@code pattern} and emit {@link Message messages} received for
114120 * those.
121+ * <p>
122+ * Note that this method allocates a new
123+ * {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} and uses a dedicated
124+ * connection, similar to other methods on this interface. Invoking this method multiple times is an indication that
125+ * you should use {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} directly.
115126 *
116127 * @param patterns must not be {@literal null}.
117128 * @return a hot sequence of {@link Message messages}.
118129 * @since 2.1
130+ * @see org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer
119131 */
120132 default Flux <? extends Message <String , V >> listenToPattern (String ... patterns ) {
121133
@@ -126,16 +138,27 @@ default Flux<? extends Message<String, V>> listenToPattern(String... patterns) {
126138 /**
127139 * Subscribe to the Redis channels for the given {@link Topic topics} and emit {@link Message messages} received for
128140 * those.
141+ * <p>
142+ * Note that this method allocates a new
143+ * {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} and uses a dedicated
144+ * connection, similar to other methods on this interface. Invoking this method multiple times is an indication that
145+ * you should use {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} directly.
129146 *
130147 * @param topics must not be {@literal null}.
131148 * @return a hot sequence of {@link Message messages}.
132149 * @since 2.1
150+ * @see org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer
133151 */
134152 Flux <? extends Message <String , V >> listenTo (Topic ... topics );
135153
136154 /**
137155 * Subscribe to the given Redis {@code channels} and emit {@link Message messages} received for those. The
138156 * {@link Mono} completes once the {@link Topic topic} subscriptions are registered.
157+ * <p>
158+ * Note that this method allocates a new
159+ * {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} and uses a dedicated
160+ * connection, similar to other methods on this interface. Invoking this method multiple times is an indication that
161+ * you should use {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} directly.
139162 *
140163 * @param channels must not be {@literal null}.
141164 * @return a hot sequence of {@link Message messages}.
@@ -152,6 +175,11 @@ default Mono<Flux<? extends Message<String, V>>> listenToChannelLater(String...
152175 /**
153176 * Subscribe to the Redis channels matching the given {@code pattern} and emit {@link Message messages} received for
154177 * those. The {@link Mono} completes once the {@link Topic topic} subscriptions are registered.
178+ * <p>
179+ * Note that this method allocates a new
180+ * {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} and uses a dedicated
181+ * connection, similar to other methods on this interface. Invoking this method multiple times is an indication that
182+ * you should use {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} directly.
155183 *
156184 * @param patterns must not be {@literal null}.
157185 * @return a hot sequence of {@link Message messages}.
@@ -167,6 +195,11 @@ default Mono<Flux<? extends Message<String, V>>> listenToPatternLater(String...
167195 /**
168196 * Subscribe to the Redis channels for the given {@link Topic topics} and emit {@link Message messages} received for
169197 * those. The {@link Mono} completes once the {@link Topic topic} subscriptions are registered.
198+ * <p>
199+ * Note that this method allocates a new
200+ * {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} and uses a dedicated
201+ * connection, similar to other methods on this interface. Invoking this method multiple times is an indication that
202+ * you should use {@link org.springframework.data.redis.listener.ReactiveRedisMessageListenerContainer} directly.
170203 *
171204 * @param topics must not be {@literal null}.
172205 * @return a hot sequence of {@link Message messages}.
0 commit comments