Class IdempotentOnCompletion
java.lang.Object
org.apache.camel.processor.idempotent.IdempotentOnCompletion
- All Implemented Interfaces:
org.apache.camel.spi.Synchronization
On completion strategy for
IdempotentConsumer
.
This strategy adds the message id to the idempotent repository in cast the exchange was processed successfully. In
case of failure the message id is not added.-
Constructor Summary
ConstructorDescriptionIdempotentOnCompletion
(org.apache.camel.spi.IdempotentRepository idempotentRepository, String messageId, boolean eager, boolean removeOnFailure) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onComplete
(org.apache.camel.Exchange exchange) protected void
onCompletedMessage
(org.apache.camel.Exchange exchange, String messageId) A strategy method to allow derived classes to overload the behavior of processing a completed messageprotected void
onFailedMessage
(org.apache.camel.Exchange exchange, String messageId) A strategy method to allow derived classes to overload the behavior of processing a failed messagevoid
onFailure
(org.apache.camel.Exchange exchange) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.spi.Synchronization
getRouteSynchronization
-
Constructor Details
-
IdempotentOnCompletion
public IdempotentOnCompletion(org.apache.camel.spi.IdempotentRepository idempotentRepository, String messageId, boolean eager, boolean removeOnFailure)
-
-
Method Details
-
onComplete
public void onComplete(org.apache.camel.Exchange exchange) - Specified by:
onComplete
in interfaceorg.apache.camel.spi.Synchronization
-
onFailure
public void onFailure(org.apache.camel.Exchange exchange) - Specified by:
onFailure
in interfaceorg.apache.camel.spi.Synchronization
-
onCompletedMessage
A strategy method to allow derived classes to overload the behavior of processing a completed message- Parameters:
exchange
- the exchangemessageId
- the message ID of this exchange
-
onFailedMessage
A strategy method to allow derived classes to overload the behavior of processing a failed message- Parameters:
exchange
- the exchangemessageId
- the message ID of this exchange
-
toString
-