activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From caesarkim <>
Subject ERROR: The Consumer is closed
Date Tue, 11 Dec 2007 20:00:04 GMT

I have a jms client consuming a message from queue in the activeMQ, but for
some reason, it hangs and throws the following error. I am using ActiveMQ
4.1.  My JMS client is using multiple connections. 

here is pseudo code.
JMSClient extends Thread
   public void run()
       ActiveMQConnectionFactory factory = ...
       Connection conn = factory.createQueueConnection();
       QueueSession session = conn.createQueueSession();
       QueueReceiver receiver = session.createReceiver(queue);
            Message m = receiver.receive(1);
            // Receiving a message.


for(int i = 0; i < 10; i++)
     new JMSClient().start();

IllegalStateException: The Consumer is closed at

Does anybody know why it is thrown and how to prevent this error?  

Please correct this if i am using the jms client in a wrong way for

I am new to the activeMQ.


View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message