Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 10709 invoked from network); 21 Jan 2008 13:58:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jan 2008 13:58:01 -0000 Received: (qmail 74884 invoked by uid 500); 21 Jan 2008 13:57:51 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 74853 invoked by uid 500); 21 Jan 2008 13:57:51 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 74844 invoked by uid 99); 21 Jan 2008 13:57:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2008 05:57:50 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2008 13:57:45 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A8C6A71422C for ; Mon, 21 Jan 2008 05:57:37 -0800 (PST) Message-ID: <6938425.1200923857675.JavaMail.jira@brutus> Date: Mon, 21 Jan 2008 05:57:37 -0800 (PST) From: "Rob Davies (JIRA)" To: dev@activemq.apache.org Subject: [jira] Resolved: (AMQ-1333) Broker stops delivering messages to some consumers In-Reply-To: <20202938.1184957487746.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rob Davies resolved AMQ-1333. ----------------------------- Resolution: Fixed Fix Version/s: (was: 4.1.2) 5.1.0 > Broker stops delivering messages to some consumers > -------------------------------------------------- > > Key: AMQ-1333 > URL: https://issues.apache.org/activemq/browse/AMQ-1333 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 4.1.0 > Environment: WinXP > Reporter: Vadim Pesochinskiy > Assignee: Rob Davies > Fix For: 5.1.0 > > > This is a clone of AMQ-1251 to put the fix into 4.1.2. I think there is a serious synchronization issue here. > ----------------------------------------------------------------------------------------- > 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 issue now occurs on a very slow and busy machine after consumer gets a dozen of messages it stops getting others. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.