|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - @Beta public interface ReliableMessageListener<E>
A MessageListener to better integrate with the reliable topic.
If a regular MessageListener is registered on a reliable topic, the message listener works fine, but it can't do much
more than listening to messages.
If a ReliableMessageListener is registered on a normal topic, only the MessageListener methods will be called.
isTerminal(Throwable)
method. If a plain MessageListener is used, then it won't terminate on exceptions and keep on running. But in some
cases it is better to stop running.
isLossTolerant().
retrieveInitialSequence() returns the stored
sequence, then a at-least-once delivery is implemented since the same item is now being processed twice. To implement
an at-most-once delivery guarantee, add 1 to stored sequence when the retrieveInitialSequence() is called.
| Method Summary | |
|---|---|
boolean |
isLossTolerant()
Checks if this ReliableMessageListener is able to deal with message loss. |
boolean |
isTerminal(Throwable failure)
Checks if the ReliableMessageListener should be terminated based on an exception thrown while calling MessageListener.onMessage(com.hazelcast.core.Message). |
long |
retrieveInitialSequence()
Retrieves the initial sequence this ReliableMessageListener should start from. |
void |
storeSequence(long sequence)
Informs the ReliableMessageListener that it should store the sequence. |
| Methods inherited from interface com.hazelcast.core.MessageListener |
|---|
onMessage |
| Method Detail |
|---|
long retrieveInitialSequence()
void storeSequence(long sequence)
sequence - the sequenceboolean isLossTolerant()
boolean isTerminal(Throwable failure)
MessageListener.onMessage(com.hazelcast.core.Message).
failure - the failure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||