Hi
We are using JAVA Program standalone to poll activeMQ queues. The way we do
is following we go and try to get the message using
consumer.receive(timeout) call and if the it receives the message we use
while loop to get more messages if they are in the queue. The sample code of
what we do is attach here 

Message msg = consumer.receiveMsg(30*1000) //timeout can be configured.
//do some processing here to send the message to the destination system.

While(msg != null) {
//do some processing here to send the message to the destination system.
}

Now the problem is if I put say 1000 message in the queue sometime it picks
1 message some time it picks 200 message... the number are random it seems
there some issue in receiveNoWait call which causes it to return null
prematurely.

Seems like a bug in the ActiveMQ we are using ActiveMQ 5.2 version


-- 
View this message in context: 
http://www.nabble.com/receiveNoWait%28%29-return-null-even-if-there-are-messages-in-queue-tp22733573p22733573.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to