/** * Subscribe to the given Redis {@code channels} and emit {@link Message messages} received for those. * * @param channels must not be {@literal null}. * @return a hot sequence of {@link Message messages}. * @since 2.1 */ default Flux<? extends Message<String, V>> listenToChannel(String... channels) { Assert.notNull(channels, "Channels must not be null!"); return listenTo(Arrays.stream(channels).map(ChannelTopic::of).toArray(ChannelTopic[]::new)); }
/** * Subscribe to the Redis channels matching the given {@code pattern} and emit {@link Message messages} received for * those. * * @param patterns must not be {@literal null}. * @return a hot sequence of {@link Message messages}. * @since 2.1 */ default Flux<? extends Message<String, V>> listenToPattern(String... patterns) { Assert.notNull(patterns, "Patterns must not be null!"); return listenTo(Arrays.stream(patterns).map(PatternTopic::of).toArray(PatternTopic[]::new)); }
/** * Subscribe to the given Redis {@code channels} and emit {@link Message messages} received for those. * * @param channels must not be {@literal null}. * @return a hot sequence of {@link Message messages}. * @since 2.1 */ default Flux<? extends Message<String, V>> listenToChannel(String... channels) { Assert.notNull(channels, "Channels must not be null!"); return listenTo(Arrays.stream(channels).map(ChannelTopic::of).toArray(ChannelTopic[]::new)); }
/** * Subscribe to the given Redis {@code channels} and emit {@link Message messages} received for those. * * @param channels must not be {@literal null}. * @return a hot sequence of {@link Message messages}. * @since 2.1 */ default Flux<? extends Message<String, V>> listenToChannel(String... channels) { Assert.notNull(channels, "Channels must not be null!"); return listenTo(Arrays.stream(channels).map(ChannelTopic::of).toArray(ChannelTopic[]::new)); }
/** * Subscribe to the Redis channels matching the given {@code pattern} and emit {@link Message messages} received for * those. * * @param patterns must not be {@literal null}. * @return a hot sequence of {@link Message messages}. * @since 2.1 */ default Flux<? extends Message<String, V>> listenToPattern(String... patterns) { Assert.notNull(patterns, "Patterns must not be null!"); return listenTo(Arrays.stream(patterns).map(PatternTopic::of).toArray(PatternTopic[]::new)); }
/** * Subscribe to the Redis channels matching the given {@code pattern} and emit {@link Message messages} received for * those. * * @param patterns must not be {@literal null}. * @return a hot sequence of {@link Message messages}. * @since 2.1 */ default Flux<? extends Message<String, V>> listenToPattern(String... patterns) { Assert.notNull(patterns, "Patterns must not be null!"); return listenTo(Arrays.stream(patterns).map(PatternTopic::of).toArray(PatternTopic[]::new)); }