I am using the io.lettuce.core library and I am having trouble subscribing to a channel using the RedisPubSubReactiveCommands
interface.
I have a StatefulRedisPubSubConnection
and an active redis cluster which I am attempting to subscribe to.
connection.sync().subscribe("channel")
works fine, as does connection.async().subscribe("channel")
. However, when I use the reactive 'hot observable' interface provided by lettuce like so:
connection.reactive().subscribe(channels).subscribe();
connection.reactive().observeChannels().doOnNext(this::notifyObservers).subscribe();
It will not register as a subscription action on redis. I feel like I'm following the example given in the lettuce documentation closely.
I'm programming for an interface that accepts a hot Flux
Observable and I'm getting close to wrapping the sync or async connection interfaces with my own reactive wrapper and throwing them in the pipe. What am I doing wrong here?