Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I need to have a queue mirrored in two distributed servers with WAN between them.

Does the RabbitMQ suit for my situation?

Or should I start with another AMQP solution? Which? Or non-AMQP? What about Redis?

Some more details:

Script at server "A" sends the "x" command locally. Script at server "B" receives the "x" command locally too. And vice versa with another queue.

If there's a problem with availability of server B, it still receives the "x" command, just a bit later, when it becomes available. But my program does not need to watch that. Queue broker must control the cross-machine delivery.

share|improve this question
What should happen when the network link goes down between the two servers? –  dan_waterworth Jul 19 '12 at 17:47
Queue at "A" must continue receive and hold the messages. When the link is up again, those messages must be mirrored into the local copy of queue at "B" as usual. –  Pavel Koryagin Jul 19 '12 at 18:03
You should look at zeromq.org is very flexible MQ library and easy to use. –  ematus Jul 24 '12 at 20:52

2 Answers 2

I believe the tools you list are all broker based.

The only distributed message queue that I've used (though I'm sure there are more) is Microsoft's MSMQ. It's included with Windows and Windows Server operating systems. I know of large scale projects that use it in production paired with the .NET WCF framework, which has bindings for it. All machines running MSMQ are capable of hosting queues, and being clients to other machines - they are a network of peers.

This has just the effect you describe: messages sent from Host A to Host B (while Host A is disconnected), will sit in an "OUTGOING" queue on Host A until such time as it can connect, within a prescribed time-out limit. If the time-out limit is reached the message will be moved to a "dead letter queue".

That said, it looks like at least ApacheMQ and RabbitMQ have configuration notes on how to achieve this. It looks like basically you're just installing the broker on each client.

share|improve this answer

You might want to take a look at NServiceBus. This provides transactional support for the processing of messages in a distributed system as well a workflow (sagas), scaling and reliability. It may be suited to your needs.

NServiceBus is not a queuing technology itself, but is the processing layer (bus) on top of the queue. It traditionally uses MSMQ, but version 4 introduces support for using other message transports such as RabbitMQ and ActiveMQ; it also enables using SQL Server as the queue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.