From dev-return-13274-apmail-activemq-dev-archive=activemq.apache.org@activemq.apache.org Wed Nov 05 14:31:31 2008 Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 453 invoked from network); 5 Nov 2008 14:31:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Nov 2008 14:31:31 -0000 Received: (qmail 27920 invoked by uid 500); 5 Nov 2008 14:31:37 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 27889 invoked by uid 500); 5 Nov 2008 14:31:36 -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 27311 invoked by uid 99); 5 Nov 2008 14:31:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2008 06:31:35 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2008 14:30:25 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7F99E234C278 for ; Wed, 5 Nov 2008 06:31:06 -0800 (PST) Message-ID: <1456123325.1225895466517.JavaMail.jira@brutus> Date: Wed, 5 Nov 2008 06:31:06 -0800 (PST) From: "Martin Haslinger (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-1995) Exception "The Consumer is closed" in multithreaded environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Exception "The Consumer is closed" in multithreaded environment --------------------------------------------------------------- Key: AMQ-1995 URL: https://issues.apache.org/activemq/browse/AMQ-1995 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 5.2.0, 5.1.0 Environment: Windows XP, JRE 1.5.0_12, 2GB Memory, Dual-core Reporter: Martin Haslinger I got the following exception when running the TempQueueMemoryTest and increasing number of producer, consumers and messages: javax.jms.IllegalStateException: The Consumer is closed at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:699) at org.apache.activemq.ActiveMQMessageConsumer.getMessageListener(ActiveMQMessageConsumer.java:339) at org.apache.activemq.ActiveMQSession.checkMessageListener(ActiveMQSession.java:1864) at org.apache.activemq.ActiveMQMessageConsumer.checkMessageListener(ActiveMQMessageConsumer.java:717) at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:457) at TempQueueMemoryTest$1Producer.run(TempQueueMemoryTest.java:94) The error happens at "Message reply = consumer.receive();", the message is not received. I increased the number of consumers and produceres to 2 and the number of messages to 5000. When using larger numbers the exception is thrown more often (unpredictable how often exactly). It definitly seems to be a multithreading-related problem because it only happens with multiple threads producing/consuming and the more threads you have the more often it happens. Tested with 5.2 RC2. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.