public interface Subscriber
A class implementing this interface must wear a Register
annotation to be
discovered by Redis
. Once a message is published via Redis.publish(String, String)
all subscribers
on all connected nodes will be notified via onMessage(String)
.
Modifier and Type | Method and Description |
---|---|
String |
getTopic()
Returns the name of the topic to subscribe to.
|
void |
onMessage(String message)
Invoked for each message received from redis for the subscribed topic.
|
Copyright © 2018. All rights reserved.