final Jedis slave1 = pool.getResource(); // just a node of Redis instance
final JedisSubscription listener = new JedisSubscription();
new Thread(new Runnable() {
@Override
public void run() {
try {
log.info("Subscribing to \"mymaster\". This thread is blocked.");
slave1.subscribe(listener, "+odown");
log.info("Subscription ended.");
} catch(Exception ex) {
log.error("Subscription failure: ", ex);
}
}
}).start();
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.