E
- message@FunctionalInterface public interface MessageListener<E> extends EventListener
ITopic
.
Provided that a MessageListener is not registered twice, a MessageListener will never be called concurrently. So there
is no need to provide thread-safety on internal state in the MessageListener. Also there is no need to enforce safe
publication, the ITopic is responsible for the memory consistency effects. In other words, there is no need to make
internal fields of the MessageListener volatile or access them using synchronized blocks.Modifier and Type | Method and Description |
---|---|
void |
onMessage(Message<E> message)
Invoked when a message is received for the added topic.
|
void onMessage(Message<E> message)
message
- the message that is received for the added topicCopyright © 2021 Hazelcast, Inc.. All rights reserved.