Interface NewMessageIdentifier
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface NewMessageIdentifier
An optimization for stateful retry of message processing. If a message is known to be "new", i.e. never consumed before by this or any other client, then there are potential optimizations for managing the state associated with tracking the processing of a message (e.g. there is no need to check a cache for a hit).- Author:
- Dave Syer, Gary Russell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isNew(Message message)
Query a message to see if it has been seen before.
-
-
-
Method Detail
-
isNew
boolean isNew(Message message)
Query a message to see if it has been seen before. Usually it is only possible to know if it has definitely not been seen before (e.g. through the redelivered flag, which would be used by default). Clients can customize the retry behaviour for failed messages by implementing this method.- Parameters:
message
- the message to test- Returns:
- true if the message is known to not have been consumed before
-
-