You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ishitori <Is...@bk.ru> on 2011/11/03 12:54:19 UTC

Re: Redelivery sticks to and blocks a consumer thread

Is there any progress conserning this issue? I am using the latest version of
ActiveMQ 5.5.0 and the situation is the same: consumer threads doesn't
receive any messages until full redelivery cycle is completed.

Can this be somehow resolved? Expected behaviour is: failed to process
message is sent back to queue and after some time gots redelivered back

--
View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-sticks-to-and-blocks-a-consumer-thread-tp2358923p3985367.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Redelivery sticks to and blocks a consumer thread

Posted by Ishitori <Is...@bk.ru>.
Hm, it seems that I don't fully understand how consumers are working.

I've merged fix from the JMS and it seems working nice if there is a small
amount of messages to resend. But if I try to put a big amount of "bad"
messages in queue, I will still get the same behavior: all my consumers got
stuck.

Why does it happen? I have 20 consumers and 500 bad messages in a queue.
Does it mean, that every consumer got stuck with a bad message and try to
honor redelivery policy, though every consumer does release all prefetched
messages? Can I change this behaviour or it is a way how ActiveMQ works
(honoring of redelivery policy is up to Consumer and it is not the task of
the broker...)

Maybe I should create a separate queue where I will put every message that I
couldn't process at the first time? And some consumers will watch this queue
and redelivery policy will be honored by them? What if a big amount of bad
messages will be put there? Will I experience the same problem?

--
View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-sticks-to-and-blocks-a-consumer-thread-tp2358923p4091547.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Redelivery sticks to and blocks a consumer thread

Posted by Ishitori <Is...@bk.ru>.
Okay, it seems I have 2 options:

1) Merge all changes from Java into NMS
2) Try to use camel case routes to define a rule. The scheme will be the
following:

* Consumer receives a message and it can't process it
* Consumer move message to its own DLQ, which is actually works as a
temporary storage
* There is a camel route defined, like you have pointed in
https://issues.apache.org/jira/browse/AMQ-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs
that executes the following logic:

if (message.headers.RedeliveryCount < 5)
{
    Move message back to original queue
}
else
{
   move message to real DLQ
}

Can this being done using the page
https://issues.apache.org/jira/browse/AMQ-2710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs
and conditional logic from
http://activemq.apache.org/sample-camel-routes.html ?

--
View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-sticks-to-and-blocks-a-consumer-thread-tp2358923p3986248.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Redelivery sticks to and blocks a consumer thread

Posted by Gary Tully <ga...@gmail.com>.
sorry, not sure about NMS. Keeping message order is the default so I
think NMS would need a similar enhancement to support out of order
delivery.

On 3 November 2011 14:18, Ishitori <Is...@bk.ru> wrote:
> Hi, Gary.
>
> Thanks for the answer. I forgot to mention that I am using NMS. Does it make
> the difference? I mean, that you gave the link to ActiveMQ client code,
> right? Is there something like that for NMS?
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-sticks-to-and-blocks-a-consumer-thread-tp2358923p3986026.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com

Re: Redelivery sticks to and blocks a consumer thread

Posted by Ishitori <Is...@bk.ru>.
Hi, Gary.

Thanks for the answer. I forgot to mention that I am using NMS. Does it make
the difference? I mean, that you gave the link to ActiveMQ client code,
right? Is there something like that for NMS?

--
View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-sticks-to-and-blocks-a-consumer-thread-tp2358923p3986026.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Redelivery sticks to and blocks a consumer thread

Posted by Gary Tully <ga...@gmail.com>.
try a current 5.6-SNAPSHOT
see: https://issues.apache.org/jira/browse/AMQ-1853

On 3 November 2011 11:54, Ishitori <Is...@bk.ru> wrote:
> Is there any progress conserning this issue? I am using the latest version of
> ActiveMQ 5.5.0 and the situation is the same: consumer threads doesn't
> receive any messages until full redelivery cycle is completed.
>
> Can this be somehow resolved? Expected behaviour is: failed to process
> message is sent back to queue and after some time gots redelivered back
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Redelivery-sticks-to-and-blocks-a-consumer-thread-tp2358923p3985367.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com