[rabbitmq-discuss] RabbitMQ -- communicate between 3 different machines?

csharpplusproject csharpplusproject at gmail.com
Mon Jul 18 01:11:44 BST 2011


Hi Alavro,

Thank you for your response.

Yes, I confirm that I am successful connecting to my server
(192.168.0.1) from my 2 worker clients (192.168.0.2, 192.168.0.3) by
specifying the server's IP.

Yet, this brings down another question -- in this case, I have a single
server (192.168.0.1) and 2 worker clients (192.168.0.2, 192.168.0.3).

Since my server is a 'single point of failure', what happens if my
server dies? How does RabbitMQ handle such a case?

Is there a way to make things more reliabile? (for instance, have
multiple nodes that will all have the same contents of 192.168.0.1 and
thus provide reliability in case the main server dies...).

I appreciate your help.

Best,
Shalom.


-----Original Message-----
From: Alvaro Videla <videlalvaro at gmail.com>
To: csharpplusproject <csharpplusproject at gmail.com>
Cc: Jason J. W. Williams <jasonjwwilliams at gmail.com>,
rabbitmq-discuss at lists.rabbitmq.com
Subject: Re: [rabbitmq-discuss] RabbitMQ -- communicate between 3
different machines?
Date: Mon, 18 Jul 2011 01:20:23 +0200

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/20110717/345d869f/attachment.htm>


More information about the rabbitmq-discuss mailing list