public interface MessageMatcher
A Message Matcher is used by a conflation policy when it is necessary to locate a message within a message queue when searching a queue for conflation purposes.
The matcher is used to search queues for the last message queued for a given Topic.
If a matcher is not specified then a default is used which will always match two messages of the same Topic.
Any implementation of a MessageMatcher must be stateless and a single matcher can therefore be used for many different policies.
Modifier and Type | Field and Description |
---|---|
static MessageMatcher |
DEFAULT
This is an instance of the default message matcher which has the null
effect of always matching (i.e.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(TopicMessage currentMessage,
TopicMessage newMessage)
Compares two messages to determine whether they can be conflated.
|
static final MessageMatcher DEFAULT
boolean matches(TopicMessage currentMessage, TopicMessage newMessage)
The two messages presented will always be of the same Topic so a matcher can be used for more fine grained conflation behaviour.
currentMessage
- the message currently queuednewMessage
- the new message to be compared with the queued message.Copyright © 2016 Push Technology Ltd. All Rights Reserved.