Package org.apache.camel.model
Class ResequenceDefinition
java.lang.Object
org.apache.camel.model.OptionalIdentifiedDefinition<Type>
org.apache.camel.model.ProcessorDefinition<Type>
org.apache.camel.model.OutputDefinition<ResequenceDefinition>
org.apache.camel.model.ResequenceDefinition
- All Implemented Interfaces:
org.apache.camel.CamelContextAware,org.apache.camel.LineNumberAware,Block,HasExpressionType,OutputNode,org.apache.camel.NamedNode,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.spi.IdAware
@Metadata(label="eip,routing")
public class ResequenceDefinition
extends OutputDefinition<ResequenceDefinition>
implements HasExpressionType
Resequences (re-order) messages based on an expression
-
Field Summary
Fields inherited from class org.apache.camel.model.OutputDefinition
outputsFields inherited from class org.apache.camel.model.ProcessorDefinition
disabled, inheritErrorHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEnables duplicates for the batch resequencer modebatch()Configures the batch-based resequencing algorithm using the default configuration.batch(BatchResequencerConfig config) Configures the batch-based resequencing algorithm using the givenBatchResequencerConfig.capacity(int capacity) Sets the capacity for the stream resequencercomparator(org.apache.camel.processor.resequencer.ExpressionResultComparator comparator) Sets the comparator to use for stream resequencerdeliveryAttemptInterval(long deliveryAttemptInterval) Sets the interval in milli seconds the stream resequencer will at most wait while waiting for condition of being able to deliver.Gets the expression definitiongetLabel()Returns a label to describe this node such as the expression if some kind of expression nodeIf an incomingExchangeis invalid, then it will be ignored.Sets the rejectOld flag to throw an error when a message older than the last delivered message is processedreverse()Enables reverse mode for the batch resequencer mode.voidsetBatchConfig(BatchResequencerConfig batchConfig) voidsetExpression(org.apache.camel.Expression expression) Expression to use for re-ordering the messages, such as a header with a sequence numbervoidsetExpression(ExpressionDefinition expression) Expression to use for re-ordering the messages, such as a header with a sequence numbervoidsetExpressionType(ExpressionDefinition expressionType) Expression to use for re-ordering the messages, such as a header with a sequence numbervoidsetOutputs(List<ProcessorDefinition<?>> outputs) voidsetResequencerConfig(ResequencerConfig resequencerConfig) To configure the resequencer in using either batch or stream configuration.voidsetStreamConfig(StreamResequencerConfig streamConfig) size(int batchSize) Sets the in batch size for number of exchanges receivedstream()Configures the stream-based resequencing algorithm using the default configuration.stream(StreamResequencerConfig config) Configures the stream-based resequencing algorithm using the givenStreamResequencerConfig.timeout(long timeout) Sets the timeoutSets the timeoutSets the timeouttoString()Methods inherited from class org.apache.camel.model.ProcessorDefinition
addInterceptStrategy, addOutput, aggregate, aggregate, aggregate, aggregate, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, choice, circuitBreaker, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, configureChild, convertBodyTo, convertBodyTo, convertBodyTo, delay, delay, delay, disabled, disabled, disabled, doTry, dynamicRouter, dynamicRouter, end, endChoice, endCircuitBreaker, endDoCatch, endDoTry, endParent, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getDisabled, getIndex, getInterceptStrategies, getParent, getRouteConfiguration, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, kamelet, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, nodePrefixId, onCompletion, onException, onException, pausable, pausable, pausable, pausable, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, preCreateProcessor, process, process, process, recipientList, recipientList, recipientList, recipientList, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, resumable, resumable, resumable, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setDisabled, setExchangePattern, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, setRouteConfiguration, sort, sort, sort, split, split, split, split, startupOrder, step, step, stop, threads, threads, threads, threads, throttle, throttle, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toD, toD, toD, toD, toF, transacted, transacted, transform, transform, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTapMethods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition
description, getCamelContext, getCustomId, getDescription, getDescriptionText, getId, getLineNumber, getLocation, hasCustomIdAssigned, idOrCreate, setCamelContext, setCustomId, setDescription, setGeneratedId, setId, setLineNumber, setLocation
-
Constructor Details
-
ResequenceDefinition
public ResequenceDefinition() -
ResequenceDefinition
public ResequenceDefinition(org.apache.camel.Expression expression)
-
-
Method Details
-
getOutputs
- Overrides:
getOutputsin classOutputDefinition<ResequenceDefinition>
-
setOutputs
- Overrides:
setOutputsin classOutputDefinition<ResequenceDefinition>
-
stream
Configures the stream-based resequencing algorithm using the default configuration.- Returns:
- the builder
-
batch
Configures the batch-based resequencing algorithm using the default configuration.- Returns:
- the builder
-
stream
Configures the stream-based resequencing algorithm using the givenStreamResequencerConfig.- Parameters:
config- the config- Returns:
- the builder
-
batch
Configures the batch-based resequencing algorithm using the givenBatchResequencerConfig.- Parameters:
config- the config- Returns:
- the builder
-
timeout
Sets the timeout- Parameters:
timeout- timeout in millis- Returns:
- the builder
-
timeout
Sets the timeout- Parameters:
timeout- timeout- Returns:
- the builder
-
timeout
Sets the timeout- Parameters:
timeout- timeout- Returns:
- the builder
-
deliveryAttemptInterval
Sets the interval in milli seconds the stream resequencer will at most wait while waiting for condition of being able to deliver.- Parameters:
deliveryAttemptInterval- interval in millis- Returns:
- the builder
-
rejectOld
Sets the rejectOld flag to throw an error when a message older than the last delivered message is processed- Returns:
- the builder
-
size
Sets the in batch size for number of exchanges received- Parameters:
batchSize- the batch size- Returns:
- the builder
-
capacity
Sets the capacity for the stream resequencer- Parameters:
capacity- the capacity- Returns:
- the builder
-
allowDuplicates
Enables duplicates for the batch resequencer mode- Returns:
- the builder
-
reverse
Enables reverse mode for the batch resequencer mode. This means the expression for determine the sequence order will be reversed. Can be used for Z..A or 9..0 ordering.- Returns:
- the builder
-
ignoreInvalidExchanges
If an incomingExchangeis invalid, then it will be ignored.- Returns:
- builder
-
comparator
public ResequenceDefinition comparator(org.apache.camel.processor.resequencer.ExpressionResultComparator comparator) Sets the comparator to use for stream resequencer- Parameters:
comparator- the comparator- Returns:
- the builder
-
toString
- Overrides:
toStringin classOutputDefinition<ResequenceDefinition>
-
getShortName
- Specified by:
getShortNamein interfaceorg.apache.camel.NamedNode- Overrides:
getShortNamein classOutputDefinition<ResequenceDefinition>
-
getLabel
Description copied from class:ProcessorDefinitionReturns a label to describe this node such as the expression if some kind of expression node- Specified by:
getLabelin interfaceorg.apache.camel.NamedNode- Overrides:
getLabelin classProcessorDefinition<ResequenceDefinition>
-
getResequencerConfig
-
setResequencerConfig
To configure the resequencer in using either batch or stream configuration. Will by default use batch configuration. -
getBatchConfig
-
getStreamConfig
-
setBatchConfig
-
setStreamConfig
-
getExpression
-
setExpression
Expression to use for re-ordering the messages, such as a header with a sequence number -
setExpression
public void setExpression(org.apache.camel.Expression expression) Expression to use for re-ordering the messages, such as a header with a sequence number -
getExpressionType
Description copied from interface:HasExpressionTypeGets the expression definition- Specified by:
getExpressionTypein interfaceHasExpressionType
-
setExpressionType
Expression to use for re-ordering the messages, such as a header with a sequence number- Specified by:
setExpressionTypein interfaceHasExpressionType
-