activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <>
Subject [jira] Commented: (AMQ-1995) Exception "The Consumer is closed" in multithreaded environment
Date Wed, 05 Nov 2008 16:55:05 GMT


Gary Tully commented on AMQ-1995:

good catch. this is a bug in the test, each Producer should have its own session as a session
is only intended for use by a single tread at a time as per the JMS spec.
I am running a quick sanity check on the changes as I type. 

> Exception "The Consumer is closed" in multithreaded environment
> ---------------------------------------------------------------
>                 Key: AMQ-1995
>                 URL:
>             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
> 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
> 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