[rabbitmq-discuss] RabbitMQ -- communicate between 3 different machines?
Alvaro Videla
videlalvaro at gmail.com
Mon Jul 18 00:20:23 BST 2011
Hi Shalom,
Start RabbitMQ on server 192.168.0.1.
Then go to say server 192.168.0.2 and start one of the workers. Do the same on server 192.168.0.3 (Change the IP according to your configuration of course).
Then on the workers code you have to specify on which host RabbitMQ is running. For example on the first tutorial you see this code:
connection = pika.BlockingConnection(pika.ConnectionParameters(
'localhost'))
Change "localhost" for the IP where RabbitMQ is running. Do the same for the message publisher.
See the documentation here: http://pika.github.com/connecting.html#connection-parameters to understand the parameters passed to a new connection.
Cheers,
Alvaro
On Jul 18, 2011, at 1:12 AM, csharpplusproject wrote:
> Hi Jason,
>
> Thank you for your assistance.
>
> Suppose that the RabbitMQ server is installed on host 192.168.0.1;
>
> How do I establish a connection between my 2 worker clients (192.168.0.2, 192.168.0.3), and the RabbitMQ server? (I'm using the pika client)
>
> Thanks,
> Shalom.
>
> -----Original Message-----
> From: Jason J. W. Williams <jasonjwwilliams at gmail.com>
> To: Shalom Rav <csharpplusproject at gmail.com>
> Cc: rabbitmq-discuss at lists.rabbitmq.com
> Subject: Re: [rabbitmq-discuss] RabbitMQ -- communicate between 3 different machines?
> Date: Sun, 17 Jul 2011 16:50:06 -0600
>
> Hi Shalom,
>
> The connection is not between the machines/clients themselves, but
> rather between the clients and the server running the RabbitMQ broker.
> You should be able to bind the clients to the queues you're using in
> the examples and RMQ will round robin incoming messages between them.
>
> -J
>
> On Sun, Jul 17, 2011 at 3:26 PM, Shalom Rav <csharpplusproject at gmail.com> wrote:
> > Using a SINGLE MACHINE, I have successfuly run the first 4 examples
> > that are on the RabbitMQ website.
> >
> > Now, I'd like to test THE SAME EXAMPLES using 3 different machines
> > that are connected in a network.
> >
> > Suppose that the RabbitMQ server is installed ONLY on host
> > 192.168.0.1;
> >
> > And suppose that I'd like to use machines {192.168.0.2, 192.168.0.3}
> > as *workers* (they DO NOT have the RabbitMQ server installed on
> > them).
> >
> > Taking for instance the first example {send.py, receive.py} -- how do
> > I establish the connection between the three machines?
> >
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-discuss at lists.rabbitmq.com
> > https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> >
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Sent form my Nokia 1100
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110718/81e157f7/attachment.htm>
More information about the rabbitmq-discuss
mailing list