Perhaps pool for messages explicitly using consumer.receive()? I don't think the JMS API caters for your case when using a MessageListener.
Regards, Torsten Mielke tors...@fusesource.com tmie...@blogspot.com On Apr 13, 2012, at 10:11 AM, sreekar wrote: > Hi Guyz, > > Is there any way to control the consumption if the message in asynchronous > mode ? > > The producer will be continuously running sending (enqueing) the messages > into the queue. > > I need to consume the [[ 1 or any number specified as argument to function > which call onMessage() ]] message at a time. > > Is there any way to accomplish this ? > > consumer = session->createConsumer( destination ); > consumer->setMessageListener( this ); > > In general how can we control the consumption of messages once the > message-listener is set. > > When i tried the examples provided, i could see that all the messages are > being dequeued.......but i could not find any logic to control the call of > *onMessage()* wherein we process the message-recieved. > > > Any help would be appreciable. > > > Thanks & Regards, > Sreekar > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/How-to-control-the-consumption-of-asynchronous-messages-tp4554121p4554121.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com.