public class IdempotentConsumer
extends org.apache.camel.support.AsyncProcessorSupport
implements org.apache.camel.CamelContextAware, org.apache.camel.Navigate<org.apache.camel.Processor>, org.apache.camel.spi.IdAware, org.apache.camel.spi.RouteIdAware
IdempotentRepository.IdempotentRepository| Constructor and Description |
|---|
IdempotentConsumer(org.apache.camel.Expression messageIdExpression,
org.apache.camel.spi.IdempotentRepository idempotentRepository,
boolean eager,
boolean completionEager,
boolean skipDuplicate,
boolean removeOnFailure,
org.apache.camel.Processor processor) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the idempotent repository
|
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
org.apache.camel.CamelContext |
getCamelContext() |
long |
getDuplicateMessageCount() |
String |
getId() |
org.apache.camel.spi.IdempotentRepository |
getIdempotentRepository() |
org.apache.camel.Expression |
getMessageIdExpression() |
org.apache.camel.Processor |
getProcessor() |
String |
getRouteId() |
boolean |
hasNext() |
boolean |
isCompletionEager() |
boolean |
isEager() |
boolean |
isRemoveOnFailure() |
boolean |
isSkipDuplicate() |
List<org.apache.camel.Processor> |
next() |
protected void |
onDuplicateMessage(org.apache.camel.Exchange exchange,
String messageId)
A strategy method to allow derived classes to overload the behaviour of
processing a duplicate message
|
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
void |
resetDuplicateMessageCount()
Resets the duplicate message counter to
0L. |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setId(String id) |
void |
setRouteId(String routeId) |
String |
toString() |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic IdempotentConsumer(org.apache.camel.Expression messageIdExpression,
org.apache.camel.spi.IdempotentRepository idempotentRepository,
boolean eager,
boolean completionEager,
boolean skipDuplicate,
boolean removeOnFailure,
org.apache.camel.Processor processor)
public org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwarepublic String getId()
getId in interface org.apache.camel.spi.HasIdpublic void setId(String id)
setId in interface org.apache.camel.spi.IdAwarepublic String getRouteId()
getRouteId in interface org.apache.camel.spi.RouteIdAwarepublic void setRouteId(String routeId)
setRouteId in interface org.apache.camel.spi.RouteIdAwarepublic boolean process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
process in interface org.apache.camel.AsyncProcessorpublic List<org.apache.camel.Processor> next()
next in interface org.apache.camel.Navigate<org.apache.camel.Processor>public boolean hasNext()
hasNext in interface org.apache.camel.Navigate<org.apache.camel.Processor>public org.apache.camel.Expression getMessageIdExpression()
public org.apache.camel.spi.IdempotentRepository getIdempotentRepository()
public org.apache.camel.Processor getProcessor()
public long getDuplicateMessageCount()
protected void doStart()
throws Exception
doStart in class org.apache.camel.support.AsyncProcessorSupportExceptionprotected void doStop()
throws Exception
doStop in class org.apache.camel.support.AsyncProcessorSupportExceptionprotected void doShutdown()
throws Exception
doShutdown in class org.apache.camel.support.service.BaseServiceExceptionpublic boolean isEager()
public boolean isCompletionEager()
public boolean isSkipDuplicate()
public boolean isRemoveOnFailure()
public void resetDuplicateMessageCount()
0L.public void clear()
protected void onDuplicateMessage(org.apache.camel.Exchange exchange,
String messageId)
exchange - the exchangemessageId - the message ID of this exchangeApache Camel