public interface ConflationPolicyConfig extends Config
A Conflation Policy is applied to Clients that are set to conflate on Topics
that the policy has been set to be used for. Policies may be configured in
properties files or set up manually using ConflationConfig
.
For a general description of how conflation works see
ConflationConfig
.
The Conflation Policy defines a MessageMatcher
and a
MessageMerger
- both are optional.
The matcher is used to locate a message in a Client queue that might be
considered for conflation with a new message that is being queued. If no
matcher is specified then MessageMatcher.DEFAULT
is used which always
matches. The default is normally sufficient but a matcher can be specified
for different matching criteria.
The merger is used to merge the contents of the current message found with a
new message being queued to produce a new merged message which would replace
the current message in the queue (either in situ or at the end of the queue
depending upon mode). If no merger is specified then the new message will
simply replace the old message either in situ or at the end of the queue
(depending upon ConflationPolicyConfig.Mode
).
A Conflation Policy has a mode of operation which can be ConflationPolicyConfig.Mode.REPLACE
or ConflationPolicyConfig.Mode.APPEND
. 'REPLACE'means that the new (or merged) message will
replace the matched message in situ (i.e. the old message is removed from the
client queue and the new one replaces it). 'APPEND' means that the matched
message is removed from the client queue and the new (or merged) message is
appended to the end of the queue. Though appending preserves the message
order (i.e the new message information does not 'jump' the queue) there is
the remote possibility that a message could repeatedly be sent to the end of
the queue and never dispatched. The mode therefore has to be chosen carefully
according to requirements.
Modifier and Type | Interface and Description |
---|---|
static class |
ConflationPolicyConfig.Mode
Conflation Mode.
|
Modifier and Type | Method and Description |
---|---|
MessageMatcher |
getMatcher()
Return the matcher in use.
|
MessageMerger |
getMerger()
Returns the merger in use (if there is one).
|
ConflationPolicyConfig.Mode |
getMode()
Return the conflation policy mode.
|
String |
getName()
Gets the conflation policy name.
|
String getName()
ConflationPolicyConfig.Mode getMode()
MessageMatcher getMatcher()
MessageMerger getMerger()
Copyright © 2016 Push Technology Ltd. All Rights Reserved.