Hello.

It's easy to configure when you write the consumer, you use the exchange
you just created to tell you whether if a success or a failure.

Here is a sample of code below
// Create the exchange
Exchange exchange = getEndpoint().createExchange();
exchange.getIn().setBody(payload);

// Process the exchange
getAsyncProcessor().process(exchange, doneSync -> {
    if (exchange.isFailed()) { rollback(); }
    else { ack(); }
});

Have a nice day,

Antoine.


2016-07-08 5:28 GMT+02:00 Evgeny M <evgeny.minkev...@gmail.com>:

> Could you please direct me to a an easy to follow example / component to
> copy
> from to develop a custom transactional consumer component.
>
> I have some experience with developing components (producers mainly), so
> what I am after is a guide how to approach transactional controls on top of
> it - essentially I need to call a specific method on the source once the
> message has been delivered successfully to the target (i.e. the route has
> not thrown any exceptions).
>
> Thank you.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Transactional-Consumer-Component-tp5784947.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>

Reply via email to