Just add a sleep in your consumer.

2008/3/14 brianbaquiran <brianbaqui...@gmail.com>:
>
> Hello,
> Is there a way to temporarily pause or throttle messages received by a
> consumer using a messageListener?
>
> I'm writing a program that takes messages from a queue and sends them to a
> process on a remote server using a proprietary TCP protocol. Unfortunately,
> the protocol/remote server handles a fixed 'window' of messages at a time.
> Once the n messages are sent, my client program has to wait for
> acknowledgements  before sending more messages. Each message the client send
> gets an ack from the remote server, and acks may come in any order.
>
> So now I'm looking for a way to turn off the messageListener when the number
> of unacknowledged messages reaches the maximum number allowed, and turn on
> the messageListener as soon as I receive an ack from the server. Is there a
> correct way to do this?
> --
> View this message in context: 
> http://www.nabble.com/Pausing-a-consumer-tp16043150s2354p16043150.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

Reply via email to