Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BA991200BD4 for ; Fri, 2 Dec 2016 07:11:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B98E9160B25; Fri, 2 Dec 2016 06:11:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 13A2B160B29 for ; Fri, 2 Dec 2016 07:11:00 +0100 (CET) Received: (qmail 67501 invoked by uid 500); 2 Dec 2016 06:11:00 -0000 Mailing-List: contact issues-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 issues@activemq.apache.org Received: (qmail 67414 invoked by uid 99); 2 Dec 2016 06:10:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 06:10:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8FAAC2C1F5A for ; Fri, 2 Dec 2016 06:10:59 +0000 (UTC) Date: Fri, 2 Dec 2016 06:10:59 +0000 (UTC) From: "Nitin (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (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-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Dec 2016 06:11:01 -0000 [ https://issues.apache.org/jira/browse/AMQ-1995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15714203#comment-15714203 ] Nitin commented on AMQ-1995: ---------------------------- Hi, I am using apache-activemq-5.14.1 and i am getting the same error. Could you kindly assist as how can i resolve it. com.irdeto.manager.endpoint.activemq.MessageConsumerManager - The Consumer is closed javax.jms.IllegalStateException: The Consumer is closed at org.apache.activemq.ActiveMQMessageConsumer.checkClosed(ActiveMQMessageConsumer.java:880) at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:678) at org.apache.activemq.jms.pool.PooledMessageConsumer.receiveNoWait(PooledMessageConsumer.java:72) at com.irdeto.manager.endpoint.activemq.MessageConsumerManager$2.run(MessageConsumerManager.java:105) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Thanks in advance > Exception "The Consumer is closed" in multithreaded environment > --------------------------------------------------------------- > > Key: AMQ-1995 > URL: https://issues.apache.org/jira/browse/AMQ-1995 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.1.0, 5.2.0 > Environment: Windows XP, JRE 1.5.0_12, 2GB Memory, Dual-core > Reporter: Martin Haslinger > Assignee: Gary Tully > Fix For: 5.2.0 > > > 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 was sent by Atlassian JIRA (v6.3.4#6332)