[rabbitmq-discuss] How to use queues for RPC
Marek Majkowski
majek04 at gmail.com
Tue Jan 11 15:34:47 GMT 2011
Hi,
On Tue, Jan 11, 2011 at 15:25, Vince Filby <vfilby at gmail.com> wrote:
> I have a distributed system with one central controller and many
> devices on remote networks, I want to use AMQP to facilitate
> communication between the controller and the clients. The
> communication is mostly RPC but some or pure data (logs, etc).
>
> It is also imperative that the communication is secure, so that no one
> can eavesdrop or pose as a client to send false messages.
>
> Should each client have their own queue that is consistently named?
Clients should have random callback queue names.
> Perhaps when the client connects it creates a randomly named queue it
> tells the controller what queue it will be subscribed to? What are the
> best practises?
We're working on tutorial that says about RPC.
You can find the code here:
https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/python/rpc_client.py
https://github.com/rabbitmq/rabbitmq-tutorials/blob/master/python/rpc_server.py
A general idea is explained here:
http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2010-November/009909.html
>
> Any advice would be greatly appreciated, especially with regard to
> securing the queues.
There's not much to be said on this matter. If you want to make sure
that rpc client doesn't behave as rpc worker you need to use strong
AMQP credentials. You can use rabbitmqctl tool for setting usernames
and permissions.
Hope that helps
Cheers,
Marek
More information about the rabbitmq-discuss
mailing list