You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by berhack <ro...@gmail.com> on 2013/10/08 04:49:39 UTC

Camel JMS redelivery blocks normal processing

Hi all,

Does anyone know how to properly implement redelivery that does not block
normal processing of other messages?

I have an error handler defined with DLQ, but once that kicks in, no
messages will be consumed.

I know about asyncConsumer, I set it on the JmsConfiguration but to no
avail.  Once it starts the retry/redelivery, nothing else is coming through!

I only got this to work if you up the concurrent consumers to say, 2, but
that's not what I'm looking for, since then it just delays the inevitable by
increasing the failure capacity to 2, then it will block again.

As an experiment, I set both options (asyncConsumer=true,
maxConcurrentConsumers=2) and got unexpected results - my problem message
was being processed twice...

I notice that during redelivery, the problem message is not dequeued, and
maybe that is the problem.  Even if asyncConsumer = true, it keeps retrying
the same message over and over?  If that is the case, how do you get the JMS
consumer to dequeue during retry?

Any input would be appreciated.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-redelivery-blocks-normal-processing-tp5741069.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel JMS redelivery blocks normal processing

Posted by Christian Müller <ch...@gmail.com>.
We use the Delay and Schedule Message Delivery [1] feature from ActiveMQ.
You will find the link [2] useful.

[1] http://activemq.apache.org/delay-and-schedule-message-delivery.html
[2]
camel.465427.n5.nabble.com/Missing-feature-to-handle-errors-in-a-route-which-reads-from-an-activemq-destination-td4416986.html

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Tue, Oct 8, 2013 at 6:52 AM, berhack <ro...@gmail.com> wrote:

> By the way, I am using Camel 2.11.1 and also in my error handler I made
> sure
> I use asyncDelayedRedelivery.  So everything seems to be in order, yet I
> cannot get the redelivery to be fully async
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-JMS-redelivery-blocks-normal-processing-tp5741069p5741073.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Camel JMS redelivery blocks normal processing

Posted by berhack <ro...@gmail.com>.
By the way, I am using Camel 2.11.1 and also in my error handler I made sure
I use asyncDelayedRedelivery.  So everything seems to be in order, yet I
cannot get the redelivery to be fully async



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-redelivery-blocks-normal-processing-tp5741069p5741073.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel JMS redelivery blocks normal processing

Posted by Christian Posta <ch...@gmail.com>.
Can do non-blocking redelivery on the consumer:

Set this on your conn factory:

jms.nonBlockingRedelivery=true


Also consider broker-based redelivery:
http://activemq.apache.org/message-redelivery-and-dlq-handling.html#MessageRedeliveryandDLQHandling-BrokerRedelivery%28v5.7%29



On Wed, Oct 9, 2013 at 11:19 PM, Claus Ibsen <cl...@gmail.com> wrote:

> Are you using transacted ack mode with the broker? And what broker do
> you use? If you use AMQ then it will by default do redelivery in
> sequence on the consumer.
>
> I think there is an option to turn async behavior on, but can't easily
> find it in the docs, but there is a JIRA about that.
>
> Also mind that with AMQ prefect size matter, its 1000 by default.
>
> On Tue, Oct 8, 2013 at 4:49 AM, berhack <ro...@gmail.com> wrote:
> > Hi all,
> >
> > Does anyone know how to properly implement redelivery that does not block
> > normal processing of other messages?
> >
> > I have an error handler defined with DLQ, but once that kicks in, no
> > messages will be consumed.
> >
> > I know about asyncConsumer, I set it on the JmsConfiguration but to no
> > avail.  Once it starts the retry/redelivery, nothing else is coming
> through!
> >
> > I only got this to work if you up the concurrent consumers to say, 2, but
> > that's not what I'm looking for, since then it just delays the
> inevitable by
> > increasing the failure capacity to 2, then it will block again.
> >
> > As an experiment, I set both options (asyncConsumer=true,
> > maxConcurrentConsumers=2) and got unexpected results - my problem message
> > was being processed twice...
> >
> > I notice that during redelivery, the problem message is not dequeued, and
> > maybe that is the problem.  Even if asyncConsumer = true, it keeps
> retrying
> > the same message over and over?  If that is the case, how do you get the
> JMS
> > consumer to dequeue during retry?
> >
> > Any input would be appreciated.
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/Camel-JMS-redelivery-blocks-normal-processing-tp5741069.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: Camel JMS redelivery blocks normal processing

Posted by Claus Ibsen <cl...@gmail.com>.
Are you using transacted ack mode with the broker? And what broker do
you use? If you use AMQ then it will by default do redelivery in
sequence on the consumer.

I think there is an option to turn async behavior on, but can't easily
find it in the docs, but there is a JIRA about that.

Also mind that with AMQ prefect size matter, its 1000 by default.

On Tue, Oct 8, 2013 at 4:49 AM, berhack <ro...@gmail.com> wrote:
> Hi all,
>
> Does anyone know how to properly implement redelivery that does not block
> normal processing of other messages?
>
> I have an error handler defined with DLQ, but once that kicks in, no
> messages will be consumed.
>
> I know about asyncConsumer, I set it on the JmsConfiguration but to no
> avail.  Once it starts the retry/redelivery, nothing else is coming through!
>
> I only got this to work if you up the concurrent consumers to say, 2, but
> that's not what I'm looking for, since then it just delays the inevitable by
> increasing the failure capacity to 2, then it will block again.
>
> As an experiment, I set both options (asyncConsumer=true,
> maxConcurrentConsumers=2) and got unexpected results - my problem message
> was being processed twice...
>
> I notice that during redelivery, the problem message is not dequeued, and
> maybe that is the problem.  Even if asyncConsumer = true, it keeps retrying
> the same message over and over?  If that is the case, how do you get the JMS
> consumer to dequeue during retry?
>
> Any input would be appreciated.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-redelivery-blocks-normal-processing-tp5741069.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen