activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Haslinger (JIRA)" <>
Subject [jira] Created: (AMQ-1995) Exception "The Consumer is closed" in multithreaded environment
Date Wed, 05 Nov 2008 14:31:06 GMT
Exception "The Consumer is closed" in multithreaded environment

                 Key: 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(
	at org.apache.activemq.ActiveMQMessageConsumer.getMessageListener(
	at org.apache.activemq.ActiveMQSession.checkMessageListener(
	at org.apache.activemq.ActiveMQMessageConsumer.checkMessageListener(
	at org.apache.activemq.ActiveMQMessageConsumer.receive(
	at TempQueueMemoryTest$

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.

View raw message