activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rolandpeng <>
Subject Re: consumer.receiveNoWait() question
Date Wed, 19 Sep 2012 01:25:03 GMT
thank you prabugp.

These are my codes listed below,

myQueue = session.createQueue(queueName);
myCons = session.createConsumer(myQueue);
inMsg = myCons.receiveNoWait();

so sure that I've listened to the right queue and no message selectors as
When the program runs into myCons.receiveNoWait(), it still remains several
pending messages in the queue.
But inMsg was null as return.

It seems not make sense that pending messages are not available.
(receiveNoWait() should retrieve the message, if there is one available in
the queue to be picked up.)

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

View raw message