public class IdempotentOnCompletion extends Object implements Synchronization
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 and Description |
|---|
IdempotentOnCompletion(IdempotentRepository<String> idempotentRepository,
String messageId,
boolean eager,
boolean removeOnFailure) |
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete(Exchange exchange)
Called when the processing of the message exchange is complete
|
protected void |
onCompletedMessage(Exchange exchange,
String messageId)
A strategy method to allow derived classes to overload the behavior of
processing a completed message
|
protected void |
onFailedMessage(Exchange exchange,
String messageId)
A strategy method to allow derived classes to overload the behavior of
processing a failed message
|
void |
onFailure(Exchange exchange)
Called when the processing of the message exchange has failed for some reason.
|
String |
toString() |
public IdempotentOnCompletion(IdempotentRepository<String> idempotentRepository, String messageId, boolean eager, boolean removeOnFailure)
public void onComplete(Exchange exchange)
SynchronizationonComplete in interface Synchronizationexchange - the exchange being processedpublic void onFailure(Exchange exchange)
SynchronizationExchange.getException() and
there could be a fault message via Message.isFault()onFailure in interface Synchronizationexchange - the exchange being processedprotected void onCompletedMessage(Exchange exchange, String messageId)
exchange - the exchangemessageId - the message ID of this exchangeprotected void onFailedMessage(Exchange exchange, String messageId)
exchange - the exchangemessageId - the message ID of this exchangeApache Camel