Newbie questions about camel redelivery vs AMQ redelivery

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie questions about camel redelivery vs AMQ redelivery

n999999
Hi

Apologies but I'm a little confused after reading up on Camel docs and books
as well as AMQ docs. My confusion might be due to almost zero experience but
thought I'd ask hopefully some simple questions before I dive in to
development with routes that consume messages from AMQs.

My understanding is that:

Camel has redelivery policies that can be configured on errorHandler and
onException components. Camel will not retry the whole route but only retry
from the channel before the failed component.

One unhappy path is that if your route fails you could loose your AMQ msg as
it has been consumed. I think the way to solve this is by using the
https://camel.apache.org/manual/latest/transactional-client.html where it
says "The redelivery in transacted mode is not handled by Camel but by the
backing system (the transaction manager). In such cases you should resort to
the backing system how to configure the redelivery."

So I can configure my ActiveMQConnectionFactory with some uri options around
redelivery.

As I understand it ActiveMQConnectionFactory retries will involve the whole
route being retried.

I think the advice is that if you are using  ActiveMQConnectionFactory
retries you should *not* have retries handled by camel errorHandlers? Is
this correct?

My confusion is about the trade off (if any) between these 2 approaches as
my googling has not found any examples of both AMQ transactional client and
Camel errorHandling being used together.  

I ask also as I wonder if there is Camel errorHandler retry functionality
that is available that might trump ActiveMQConnectionFactory retry
functionality?

Can you separate the concept of transactional client and retries? Ie have
ActiveMQConnectionFactory as a transactional client but have your retries
handled by camel?  This is where my brain starts to get fuzzy.

Cheers for any advice..

n



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Reply | Threaded
Open this post in threaded view
|

Re: Newbie questions about camel redelivery vs AMQ redelivery

jbonofre
Hi,

You can take a look on a blog I wrote about that: http://blog.nanthrax.net/?p=820 <http://blog.nanthrax.net/?p=820>

Generally speaking, I’m using Camel for short redelivery (temporary error). When I want « long » redelivery, I’m using ActiveMQ redelivery with scheduler, and in that case, I just set handled on the Camel default error handler and use CLIENT_ACK.

Regards
JB

> Le 7 févr. 2020 à 15:33, n999999 <[hidden email]> a écrit :
>
> Hi
>
> Apologies but I'm a little confused after reading up on Camel docs and books
> as well as AMQ docs. My confusion might be due to almost zero experience but
> thought I'd ask hopefully some simple questions before I dive in to
> development with routes that consume messages from AMQs.
>
> My understanding is that:
>
> Camel has redelivery policies that can be configured on errorHandler and
> onException components. Camel will not retry the whole route but only retry
> from the channel before the failed component.
>
> One unhappy path is that if your route fails you could loose your AMQ msg as
> it has been consumed. I think the way to solve this is by using the
> https://camel.apache.org/manual/latest/transactional-client.html where it
> says "The redelivery in transacted mode is not handled by Camel but by the
> backing system (the transaction manager). In such cases you should resort to
> the backing system how to configure the redelivery."
>
> So I can configure my ActiveMQConnectionFactory with some uri options around
> redelivery.
>
> As I understand it ActiveMQConnectionFactory retries will involve the whole
> route being retried.
>
> I think the advice is that if you are using  ActiveMQConnectionFactory
> retries you should *not* have retries handled by camel errorHandlers? Is
> this correct?
>
> My confusion is about the trade off (if any) between these 2 approaches as
> my googling has not found any examples of both AMQ transactional client and
> Camel errorHandling being used together.  
>
> I ask also as I wonder if there is Camel errorHandler retry functionality
> that is available that might trump ActiveMQConnectionFactory retry
> functionality?
>
> Can you separate the concept of transactional client and retries? Ie have
> ActiveMQConnectionFactory as a transactional client but have your retries
> handled by camel?  This is where my brain starts to get fuzzy.
>
> Cheers for any advice..
>
> n
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html