activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sreekar <>
Subject How to control the consumption of (asynchronous) messages ?
Date Fri, 13 Apr 2012 08:11:20 GMT
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,

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

View raw message