Look like you first consume prefetched all the messages. For more info see:
http://activemq.apache.org/what-is-the-prefetch-limit-for.html Regards Hiram On Wed, Apr 23, 2008 at 1:03 PM, gupabhi <[EMAIL PROTECTED]> wrote: > > Hi, > Following is what I'm doing. > 1. I create a connection using the ActiveMQ connectionFActory (VM). > 2.a. I create a non transacted-session, > 2.b. A queue from the session and then > 2.c. I create a QueueReceiver from that session as follows: > requestQueueReceiver = nonTxSession.createReceiver(requestQueue); > > 3. I then use springs DefaultMessageListenerContainer to read message from > the same queue. Internally it basically creates a consumer for the queue and > reads from it. (it does all this in a transaction) > > When doing this, even if there are messages in that queue. The consumer does > not receive any and keeps returing nulls. > > At first I could'nt figure out what the problem was. But then if I skipped > step 2.c. above, the problem disappeared. > > So, can there not be two consumers create for the same queue? This seems > like a bug to me. Is it? > > Thanks, > Abhi > -- > View this message in context: > http://www.nabble.com/Bug-in-ActiveMQ--Cannot-receive-message-is-two-consumers-are-created-tp16834714s2354p16834714.html > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > > -- Regards, Hiram Blog: http://hiramchirino.com Open Source SOA http://open.iona.com
