public class ResequencingMessageHandler extends AbstractCorrelatingMessageHandler
AbstractCorrelatingMessageHandler
.
Will remove MessageGroup
s only if 'sequenceSize' is provided and reached.AbstractCorrelatingMessageHandler.SequenceAwareMessageGroup
IntegrationManagement.ManagementOverrides
messagingTemplate
EXPRESSION_PARSER, logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
Constructor and Description |
---|
ResequencingMessageHandler(MessageGroupProcessor processor) |
ResequencingMessageHandler(MessageGroupProcessor processor,
MessageGroupStore store) |
ResequencingMessageHandler(MessageGroupProcessor processor,
MessageGroupStore store,
CorrelationStrategy correlationStrategy,
ReleaseStrategy releaseStrategy) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterRelease(MessageGroup messageGroup,
Collection<Message<?>> completedMessages)
Allows you to provide additional logic that needs to be performed after the MessageGroup was released.
|
protected void |
afterRelease(MessageGroup messageGroup,
Collection<Message<?>> completedMessages,
boolean timeout)
Perform group removal if its
size is equal to the sequenceSize . |
String |
getComponentType()
Subclasses may implement this method to provide component type information.
|
IntegrationPatternType |
getIntegrationPatternType()
Return a pattern type this component implements.
|
void |
setExpireGroupsUponTimeout(boolean expireGroupsUponTimeout)
Overridden to false for a resequencer so late messages are immediately discarded rather
than waiting for the next timeout
|
protected boolean |
shouldCopyRequestHeaders()
Subclasses may override this.
|
completeGroup, completeGroup, destroy, expireGroup, findLastReleasedSequenceNumber, forceComplete, getCorrelationStrategy, getDiscardChannel, getDiscardChannelName, getEvaluationContext, getExpireGroupScheduledFutures, getGroupTimeoutExpression, getLockRegistry, getMessageStore, getMinimumTimeoutForEmptyGroups, getOutputProcessor, getReleaseStrategy, handleMessageInternal, isExpireGroupsUponCompletion, isLockRegistrySet, isReleaseLockBeforeSend, isReleasePartialSequences, isRunning, isSendPartialResultOnExpiry, isSequenceAware, obtainGroupTimeout, onInit, purgeOrphanedGroups, remove, setApplicationEventPublisher, setCorrelationStrategy, setDiscardChannel, setDiscardChannelName, setExpireDuration, setExpireDurationMillis, setExpireTimeout, setForceReleaseAdviceChain, setGroupTimeoutExpression, setLockRegistry, setMessageStore, setMinimumTimeoutForEmptyGroups, setOutputProcessor, setPopSequence, setReleaseLockBeforeSend, setReleasePartialSequences, setReleaseStrategy, setSendPartialResultOnExpiry, start, stop, store, verifyResultCollectionConsistsOfMessages
addNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldSplitOutput, updateNotPropagatedHeaders
handleMessage, onComplete, onError, onNext, onSubscribe
buildSendTimer, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrack
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
handleMessage
getThisAs
getBeanName, getComponentName
public ResequencingMessageHandler(MessageGroupProcessor processor, MessageGroupStore store, CorrelationStrategy correlationStrategy, ReleaseStrategy releaseStrategy)
public ResequencingMessageHandler(MessageGroupProcessor processor, MessageGroupStore store)
public ResequencingMessageHandler(MessageGroupProcessor processor)
public final void setExpireGroupsUponTimeout(boolean expireGroupsUponTimeout)
setExpireGroupsUponTimeout
in class AbstractCorrelatingMessageHandler
expireGroupsUponTimeout
- the expireGroupsUponTimeout to setpublic String getComponentType()
IntegrationObjectSupport
getComponentType
in interface NamedComponent
getComponentType
in class AbstractCorrelatingMessageHandler
public IntegrationPatternType getIntegrationPatternType()
IntegrationPattern
getIntegrationPatternType
in interface IntegrationPattern
getIntegrationPatternType
in class MessageHandlerSupport
IntegrationPatternType
this component implements.protected boolean shouldCopyRequestHeaders()
AbstractMessageProducingHandler
shouldCopyRequestHeaders
in class AbstractMessageProducingHandler
protected void afterRelease(MessageGroup messageGroup, Collection<Message<?>> completedMessages)
AbstractCorrelatingMessageHandler
afterRelease
in class AbstractCorrelatingMessageHandler
messageGroup
- The group.completedMessages
- The completed messages.protected void afterRelease(MessageGroup messageGroup, Collection<Message<?>> completedMessages, boolean timeout)
size
is equal to the sequenceSize
.
Remove completedMessages
from the group if it isn't null.afterRelease
in class AbstractCorrelatingMessageHandler
messageGroup
- the group to clean up.completedMessages
- The completed messages.timeout
- True if the release/discard was due to a timeout.