I'm using Rabbit MQ 1.8.0 and connecting using the java client from an EJB in
JBOSS 5.1.

I'm having a problem while trying to get message from the queue using the
following codes

QueueingConsumer consumer = new QueueingConsumer(replyChannel);
replyChannel.basicConsume(replyQueueName, consumer);
boolean run = true;

logger.info("BEFORE LOOP");
while (run) {
QueueingConsumer.Delivery delivery = null;
logger.info("GETTING MESSAGE");
try {

delivery = consumer.nextDelivery();
logger.info("MESSAGE RECIEVED STATE ");

replyChannel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);



} catch (InterruptedException ie) {
logger.info(ie.getMessage());
continue;
}

....
}


I managed to get the first message successfully but the second and
subsequent messages never gets delivered.
From the output, it seems that the attempt to get the message stuck at
delivery = consumer.nextDelivery() .
MESSAGE RECIEVED STATE gets print out for the first time only.
From then on, all the messages gets piled up in the queue.
Any idea why?


--
View this message in context: http://old.nabble.com/Consumer-Not-Getting-Message-tp29941664p29941664.html
Sent from the RabbitMQ mailing list archive at Nabble.com.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedOct 12, '10 at 9:43a
activeOct 14, '10 at 1:56p
posts2
users2
websiterabbitmq.com
irc#rabbitmq

2 users in discussion

Azzuwan: 1 post Rob Harrop: 1 post

People

Translate

site design / logo © 2022 Grokbase