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
ConstructorsConstructorDescriptionIdempotentOnCompletion(org.apache.camel.spi.IdempotentRepository idempotentRepository, String messageId, boolean eager, boolean removeOnFailure) -
Method Summary
Modifier and TypeMethodDescriptionvoidonComplete(org.apache.camel.Exchange exchange) protected voidonCompletedMessage(org.apache.camel.Exchange exchange, String messageId) A strategy method to allow derived classes to overload the behavior of processing a completed messageprotected voidonFailedMessage(org.apache.camel.Exchange exchange, String messageId) A strategy method to allow derived classes to overload the behavior of processing a failed messagevoidonFailure(org.apache.camel.Exchange exchange) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
onCompletein interfaceorg.apache.camel.spi.Synchronization
-
onFailure
public void onFailure(org.apache.camel.Exchange exchange) - Specified by:
onFailurein 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
-