You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sreekar <tr...@gmail.com> on 2012/04/13 10:11:20 UTC
How to control the consumption of (asynchronous) messages ?
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.
Re: How to control the consumption of (asynchronous) messages ?
Posted by Torsten Mielke <to...@fusesource.com>.
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
torsten@fusesource.com
tmielke@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.