activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sitsky (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-1251) Broker stops delivering messages to some consumers
Date Thu, 20 Sep 2007 11:31:25 GMT

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

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

Hi Hiram,

I have found an issue with your change I believe.  While running my code, I received the following
exception:

[ActiveMQ Task] 881755 ERROR org.apache.activemq.broker.region.Queue.worker-items - Failed
to page in more queue messages 
java.lang.RuntimeException: not implemented
	at org.apache.activemq.broker.region.NullMessageReference.isDropped(NullMessageReference.java:47)
	at org.apache.activemq.broker.region.cursors.VMPendingMessageCursor.isEmpty(VMPendingMessageCursor.java:43)
	at org.apache.activemq.broker.region.PrefetchSubscription.add(PrefetchSubscription.java:119)
	at org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy.dispatch(RoundRobinDispatchPolicy.java:70)
	at org.apache.activemq.broker.region.Queue.doDispatch(Queue.java:1054)
	at org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:1069)
	at org.apache.activemq.broker.region.Queue.iterate(Queue.java:940)
	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:118)
	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:42)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

I can't look at the code where I am writing this from, but is this something easy to fix?
 Thanks.

Cheers,
David


> 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
>
>         Attachments: QueueWorkerPrefetchTest.java, TestActiveMQ.java, TestActiveMQSyncReceive.java
>
>
> 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.


Mime
View raw message