Skip to content

Pub Sub (3.x)

Mark Paluch edited this page Dec 10, 2016 · 2 revisions

❗️Documentation page for lettuce 3.x. Find the recent documentation for lettuce 4.x here: Pub-Sub


lettuce provides support for publish/subscribe connections. Simply register your own RedisPubSubListener and you'll get notified on message/subscribed/unsubscribed event.

lettuce provides also a RedisPubSubAdapter convenience.

Examples

RedisPubSubConnection<String, String> connection = client.connectPubSub()
connection.addListener(new RedisPubSubListener<String, String>() { ... })
connection.subscribe("channel")
Clone this wiki locally