activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BlueRhino <nie...@126.com>
Subject Multiple consumer did not receive the message
Date Sun, 11 Aug 2013 03:51:32 GMT
Hi everone:
   I used multiple consumer  to receive message from a queue .But It did not
work correctly.These is message in the queue,But the consumer did not get
it.
<http://activemq.2283324.n4.nabble.com/file/n4670263/%E6%9C%AA%E5%91%BD%E5%90%8D.jpg>

<http://activemq.2283324.n4.nabble.com/file/n4670263/%E6%9C%AA%E5%91%BD%E5%90%8D1.jpg>

And my code is this:
while (true)
		{
			log.info("GetResMsg listenling.");
			try
			{
                                getSession();
				message = (MapMessage) consumer.receive();
				jsonStr = message.getString(mqMessageName);
				session.commit();
			}
			catch (JMSException e)
			{
				log.warn(e.getMessage());
				getSession();
			}
			catch (Exception e)
			{
				log.warn(e.getMessage());
				getSession();
			}
			try
			{
				Thread.sleep(1000);
			}
			catch (InterruptedException e)
			{
				log.warn(e.getMessage());
			}
		}



--
View this message in context: http://activemq.2283324.n4.nabble.com/Multiple-consumer-did-not-receive-the-message-tp4670263.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message