[ 
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)

Reply via email to