@Metadata(label="eip,routing") public class IdempotentConsumerDefinition extends ExpressionNode
inheritErrorHandler, log| Constructor and Description |
|---|
IdempotentConsumerDefinition() |
IdempotentConsumerDefinition(Expression messageIdExpression,
IdempotentRepository<?> idempotentRepository) |
| Modifier and Type | Method and Description |
|---|---|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
IdempotentConsumerDefinition |
eager(boolean eager)
Sets whether to eagerly add the key to the idempotent repository or wait until the exchange
is complete.
|
Boolean |
getEager() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
IdempotentRepository<?> |
getMessageIdRepository() |
String |
getMessageIdRepositoryRef() |
Boolean |
getRemoveOnFailure() |
Boolean |
getSkipDuplicate() |
IdempotentConsumerDefinition |
messageIdRepository(IdempotentRepository<?> idempotentRepository)
Sets the the message id repository for the idempotent consumer
|
IdempotentConsumerDefinition |
messageIdRepositoryRef(String messageIdRepositoryRef)
Sets the reference name of the message id repository
|
IdempotentConsumerDefinition |
removeOnFailure(boolean removeOnFailure)
Sets whether to remove or keep the key on failure.
|
protected IdempotentRepository<?> |
resolveMessageIdRepository(RouteContext routeContext)
Strategy method to resolve the
IdempotentRepository to use |
void |
setEager(Boolean eager) |
void |
setExpression(ExpressionDefinition expression)
Expression used to calculate the correlation key to use for duplicate check.
|
void |
setMessageIdRepository(IdempotentRepository<?> idempotentRepository) |
void |
setMessageIdRepositoryRef(String messageIdRepositoryRef) |
void |
setRemoveOnFailure(Boolean removeOnFailure) |
void |
setSkipDuplicate(Boolean skipDuplicate) |
IdempotentConsumerDefinition |
skipDuplicate(boolean skipDuplicate)
Sets whether to skip duplicates or not.
|
String |
toString() |
configureChild, createFilterProcessor, createPredicate, getExpression, getOutputs, isOutputSupported, preCreateProcessor, setOutputsaddInterceptStrategies, addInterceptStrategy, addOutput, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, beanRef, choice, clearOutput, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endDoTry, endParent, endRest, enrich, enrich, enrich, enrichRef, enrichRef, filter, filter, filter, filter, getIndex, getInterceptStrategies, getOtherAttributes, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, makeProcessor, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichRef, pollEnrichRef, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, sample, sample, sample, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setInheritErrorHandler, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, startupOrder, stop, threads, threads, threads, threads, throttle, throttle, throwException, to, to, to, to, to, to, to, to, to, to, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wrapChannel, wrapInErrorHandler, wrapProcessordescription, description, getCustomId, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setIdpublic IdempotentConsumerDefinition()
public IdempotentConsumerDefinition(Expression messageIdExpression, IdempotentRepository<?> idempotentRepository)
public String getLabel()
ProcessorDefinitiongetLabel in interface NamedNodegetLabel in class ExpressionNodepublic IdempotentConsumerDefinition messageIdRepositoryRef(String messageIdRepositoryRef)
messageIdRepositoryRef - the reference name of message id repositorypublic IdempotentConsumerDefinition messageIdRepository(IdempotentRepository<?> idempotentRepository)
idempotentRepository - the repository instance of idempotentpublic IdempotentConsumerDefinition eager(boolean eager)
eager - true to add the key before processing, false to wait until
the exchange is complete.public IdempotentConsumerDefinition removeOnFailure(boolean removeOnFailure)
removeOnFailure - true to remove the key, false to keep the key
if the exchange fails.public IdempotentConsumerDefinition skipDuplicate(boolean skipDuplicate)
Exchange.DUPLICATE_MESSAGE set
to a Boolean.TRUE value. A none duplicate message will not have this property set.skipDuplicate - true to skip duplicates, false to allow duplicates.public void setExpression(ExpressionDefinition expression)
setExpression in class ExpressionNodepublic String getMessageIdRepositoryRef()
public void setMessageIdRepositoryRef(String messageIdRepositoryRef)
public IdempotentRepository<?> getMessageIdRepository()
public void setMessageIdRepository(IdempotentRepository<?> idempotentRepository)
public Boolean getSkipDuplicate()
public void setSkipDuplicate(Boolean skipDuplicate)
public Boolean getRemoveOnFailure()
public void setRemoveOnFailure(Boolean removeOnFailure)
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinitioncreateProcessor in class ProcessorDefinition<ExpressionNode>Exceptionprotected IdempotentRepository<?> resolveMessageIdRepository(RouteContext routeContext)
IdempotentRepository to userouteContext - route contextApache Camel