我们有兴趣听听ActiveMQ vs RabbitMQ vs ZeroMQ的优缺点。还欢迎提供有关任何其他有趣的消息队列的信息。


当前回答

编辑:我最初的回答非常关注AMQP。我决定重写它,以提供一个更广泛的观点关于这个主题。

这3种消息传递技术在构建分布式系统方面有不同的方法:

RabbitMQ is one of the leading implementation of the AMQP protocol (along with Apache Qpid). Therefore, it implements a broker architecture, meaning that messages are queued on a central node before being sent to clients. This approach makes RabbitMQ very easy to use and deploy, because advanced scenarios like routing, load balancing or persistent message queuing are supported in just a few lines of code. However, it also makes it less scalable and “slower” because the central node adds latency and message envelopes are quite big.

ZeroMq is a very lightweight messaging system specially designed for high throughput/low latency scenarios like the one you can find in the financial world. Zmq supports many advanced messaging scenarios but contrary to RabbitMQ, you’ll have to implement most of them yourself by combining various pieces of the framework (e.g : sockets and devices). Zmq is very flexible but you’ll have to study the 80 pages or so of the guide (which I recommend reading for anybody writing distributed system, even if you don’t use Zmq) before being able to do anything more complicated than sending messages between 2 peers.

ActiveMQ处于中间地带。与Zmq一样,它可以与代理和P2P拓扑一起部署。像RabbitMQ一样,它更容易实现高级场景,但通常是以牺牲原始性能为代价的。这是信息传递的瑞士军刀:-)。

最后,全部3个产品:

为最常见的语言(c++, Java, .Net, Python, Php, Ruby,…)提供客户端api 有强有力的文档 得到积极支持

其他回答

关于ZeroMQ(又名0MQ),正如您可能已经知道的那样,它是每秒钟获得最多消息的一种(上次我检查时,在其引用服务器上大约是每秒钟400万条消息),但是您可能也已经知道,不存在相关文档。您将很难找到如何启动服务器,更不用说如何使用它们了。我想这就是为什么还没有人贡献0MQ的部分原因。

玩得开心!

我没有使用ActiveMQ或RabbitMQ,但使用ZeroMQ。在我看来,ZeroMQ和ActiveMQ等之间的最大区别是0MQ是无代理的,并且没有内置消息传递的可靠性。如果您正在寻找一种易于使用、支持多种消息传递模式、传输、平台和语言绑定的消息传递API,那么0MQ绝对值得一看。如果您正在寻找一个成熟的消息传递平台,那么0MQ可能不适合。

有关如何使用0MQ的大量示例,请参阅www.zeromq.org/docs:cookbook。

我成功地使用0MQ在电力使用监控应用程序中传递消息(见http://rwscott.co.uk/2010/06/14/currentcost-envi-cc128-part-1/)

There's a comparison between RabbitMQ and ActiveMQ here. Out of the box, ActiveMQ is configured to guarantee message delivery - which can give the impression its slow compared to less reliable messaging systems. You can always change the configuration for performance if you wish and get at least as good performance as any other messaging system. At least you have that option. There's a lot of information on the forums and the ActiveMQ FAQ for configuration for scaling, performance and high availability. Also, ActiveMQ will support AMQP 1.0 when the spec is finalized, together with other wire formats, like STOMP.

ActiveMQ的另一个优点是它是一个Apache项目,所以开发者社区是多样化的——而且它不局限于一家公司。

这实际上取决于您的用例。

比较0MQ与ActiveMQ或RabbitMQ是不公平的。 ActiveMQ和RabbitMQ是需要安装和管理的消息传递系统。 他们提供了比ZeroMQ更多的功能。他们有真正的持久队列,支持事务等。

ZeroMQ是一个轻量级的面向消息的套接字实现。它也适用于进程内异步编程。在ZeroMQ上运行“企业消息传递系统”是可能的,但您必须自己实现很多工作。

So:

ActiveMQ, RabbitMQ, Websphere MQ和MSMQ是“企业消息队列”

ZeroMQ是一个面向消息的IPC库。

编辑:我最初的回答非常关注AMQP。我决定重写它,以提供一个更广泛的观点关于这个主题。

这3种消息传递技术在构建分布式系统方面有不同的方法:

RabbitMQ is one of the leading implementation of the AMQP protocol (along with Apache Qpid). Therefore, it implements a broker architecture, meaning that messages are queued on a central node before being sent to clients. This approach makes RabbitMQ very easy to use and deploy, because advanced scenarios like routing, load balancing or persistent message queuing are supported in just a few lines of code. However, it also makes it less scalable and “slower” because the central node adds latency and message envelopes are quite big.

ZeroMq is a very lightweight messaging system specially designed for high throughput/low latency scenarios like the one you can find in the financial world. Zmq supports many advanced messaging scenarios but contrary to RabbitMQ, you’ll have to implement most of them yourself by combining various pieces of the framework (e.g : sockets and devices). Zmq is very flexible but you’ll have to study the 80 pages or so of the guide (which I recommend reading for anybody writing distributed system, even if you don’t use Zmq) before being able to do anything more complicated than sending messages between 2 peers.

ActiveMQ处于中间地带。与Zmq一样,它可以与代理和P2P拓扑一起部署。像RabbitMQ一样,它更容易实现高级场景,但通常是以牺牲原始性能为代价的。这是信息传递的瑞士军刀:-)。

最后,全部3个产品:

为最常见的语言(c++, Java, .Net, Python, Php, Ruby,…)提供客户端api 有强有力的文档 得到积极支持