[rabbitmq-discuss] asychronous activation

Marek Majkowski majek04 at gmail.com
Tue Oct 25 17:29:45 BST 2011


On Tue, Oct 25, 2011 at 11:17, Chris Adkin <chrisadkin97 at googlemail.com> wrote:
> Is it possible to use RabbitMq for asynchronous RPCs,

Chris

I'm not sure what you mean by saying "asynchronous RPC".

Take a look at this tutorial:
http://www.rabbitmq.com/tutorials/tutorial-six-python.html

And feel free to modify the code as you wish.

> if so is it also
> possible to throttle the number of RPCs that are called so they dont
> swamp the machine at the receiving end of the queue.

The usual way of making sure that the consumer isn't swamped
is by using AMQP flow control: `channel.flow` command.

If you want the consumer to slow down, you can reduce
`channel.flow` prefetch to one and introduce a delay before
acknowledging a received message. Though I dont think
the latter is generally a good idea.

We could help more if you explained what you're trying to do.

Cheers,
  Marek


More information about the rabbitmq-discuss mailing list