[rabbitmq-discuss] how does the rabbitmq transport cope with WAN links?
matthew at rabbitmq.com
Tue Jun 1 16:52:40 BST 2010
On Tue, Jun 01, 2010 at 11:46:59AM -0400, Nikos Michalakis wrote:
> I was reading the RabbitMQ docs, but couldn't find many details on what exactly the underlying protocol is for sending messages between cluster nodes.
AMQP over TCP.
> I 've seen that RabbitMQ relies on distributed Erlang over TCP, but is there more specific information on how links are made reliable in RabbitMQ? More particularly I'm looking to find out more details on how RabbitMQ configures its transports between cluster nodes.
Clustering is intended for scalability only, and really needs to work in
a LAN situation, given the all-to-all connections made between erlang
nodes in a cluster. I think it's more likely you'll find utility in the
rabbitmq-shovel, which makes a broker look like a client, hence makes it
very easy to do store-and-forward (amongst other things).
We always rely on TCP.
> Are there single or multiple TCP connections between nodes?
Normally single, in a clustering environment. But if you're using the
shovel then it'll be one per shovel configuration.
> What happens when a TCP connection fails? Do nodes detect that event and try to reestablish the connection automatically? Distributed Erlang has APIs for detecting a node is down. Is that used in Rabbit?
Yes and yes. And the shovel does that too.
> Do connections rely on TCP to deal with packet loss or is there some Rabbit magic as well?
TCP is a reliable transport by definition, and sorts out packet loss and
reording itself. We rely on that.
> How are messages serialized into AMQP packets?
The AMQP payload is totally opaque. The client APIs tend to present just
byte arrays to set a message payload.
More information about the rabbitmq-discuss