You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "David Sitsky (JIRA)" <ji...@apache.org> on 2007/08/23 05:51:23 UTC

[jira] Commented: (AMQ-1251) Broker stops delivering messages to some consumers

    [ https://issues.apache.org/activemq/browse/AMQ-1251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39998 ] 

David Sitsky commented on AMQ-1251:
-----------------------------------

Can you explain how this issue is resolved?  I see this issue still occurring with a svn checkout of trunk from yesterday (revision number 568479).  From what I can see, RoundRobinDispatchPolicy hasn't been changed as recommended by the author of this bug.

Was there any code committed to fix this bug?  If so, what was it?

I see exactly the same issue - after a while in my application, the consumers stop consuming messages, and I can confirm via JMX there are a couple of messages left in a persistent queue.  When I start up a new process which is a consumer for this queue, it immediately gets these messages, and the older consumers never receive any more, despite having subscriptions to the queue (as confirmed by JMX).



> Broker stops delivering messages to some consumers
> --------------------------------------------------
>
>                 Key: AMQ-1251
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1251
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 4.1.0
>         Environment: WinXP
>            Reporter: Vadim Pesochinskiy
>            Assignee: Rob Davies
>             Fix For: 5.0.0
>
>
> I have around 40 consumers taking messages from a single queue. After awhile 1 or 2 consumers stop receiveing any messages. Going to JMX and stopping corresponding connection causes re-connect and messages are delivered again.
> I reproduced it twice in QA enviroment and now it happened in production. I tried to instrument the code and set the log in debug, but that changed timing and I failed to reproduce it after the changes.
> I suspect that runtime association b/w Queue and Consumer objects is lost on the Broker side. 
> One of the suspects is the empty catch block in the RoundRobinDispatchPolicy (line 64) class. It is possible that the CopyOnWrite array list is messed up and it fails when removed consumer is added back. 
> BTW CopyOnWrite list is good when you mostly read, but not so good when you write for every message delivery and empty catch blocks are bad in any case.
> if (firstMatchingConsumer != null) {
>       // Rotate the consumer list.
>       try {
>                 consumers.remove(firstMatchingConsumer);
>                 consumers.add(firstMatchingConsumer);
>       } catch (Throwable bestEffort) {
>       }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.