[rabbitmq-discuss] RabbitMQ use in a bad network environment
Emile Joubert
emile at rabbitmq.com
Tue Apr 23 09:32:50 BST 2013
Hi,
On 23/04/13 03:53, Peng Xiao -X (penxiao) wrote:
> I have a user environment that the connection between the message sender
> and RabbitMQ is bad, it has high delay, packet loss and the line across
> the internet.
>
> Does this environment suitable for RabbitMQ? If not, what possible
> method should be used in this environment if I want to send messages to
> backend system across the internet.
Yes, RabbitMQ can be used in a challenging network environment, if all
you need to do is publish and consume messages. The network only needs
to be good enough to allow a few roundtrips between the broker and the
client, and allow a single message to be transferred successfully with
reasonably high probability. If the network is not available for long
enough to transfer a single message then consider fragmenting messages.
If the connection setup cost is too high then consider using the STOMP
or MQTT adapters instead of AMQP.
On the publisher side you can use transactions or publisher confirms to
ensure that messages are successfully received by the broker.
On the consumer side you can use client-side acknowledgements to
guarantee that messages were successfully delivered. Under poor network
conditions consumers must be prepared to receive multiple copies of
messages.
You should not use clustering across unreliable network links. The
shovel and federation are superior alternatives in this case:
http://www.rabbitmq.com/distributed.html
-Emile
More information about the rabbitmq-discuss
mailing list