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


当前回答

如果您也对商业实现感兴趣,您应该看看my-channels中的Nirvana。

Nirvana在金融服务行业中被广泛用于大规模低延迟交易和价格分销平台。

它支持企业、网络和移动领域的各种客户端编程语言。

集群功能非常高级,如果透明的HA或负载平衡对您很重要,那么值得一试。

出于开发目的,Nirvana可以免费下载。

其他回答

我在这里写了关于AMQP, Qpid和ZeroMQ的初步经验:http://ron.shoutboot.com/2010/09/25/is-ampq-for-you/

我的主观意见是,如果您确实需要持久消息传递工具,并且不太担心代理可能成为瓶颈,那么AMQP是不错的选择。此外,c++客户端目前缺少AMQP (Qpid没有赢得我的支持;但不确定ActiveMQ客户端),但可能正在进行中。ZeroMQ可能是另一种方式。

我用的是zeroMQ。我想要一个简单的消息传递系统,我不需要复杂的代理。我也不想要一个巨大的面向Java的企业系统。

如果你想要一个快速、简单的系统,并且你需要支持多种语言(我使用C和。net),那么我建议你看看0MQ。

编辑:我最初的回答非常关注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 有强有力的文档 得到积极支持

到目前为止,我已经在生产环境中使用ActiveMQ大约3年了。虽然它完成了工作,但排列正常工作且没有错误的客户端库版本可能是一个问题。我们目前正在考虑过渡到RabbitMQ。

文中对RabbitMQ ActiveMQ和QPID的特性和性能进行了比较 http://bhavin.directi.com/rabbitmq-vs-apache-activemq-vs-apache-qpid/

就我个人而言,以上三种方法我都试过了。在我看来,RabbitMQ的性能是最好的,但是它没有故障转移和恢复选项。ActiveMQ拥有最多的特性,但速度较慢。

更新: HornetQ也是一个你可以考虑的选项,它是JMS投诉,如果你正在寻找一个基于JMS的解决方案,一个比ActiveMQ更好的选择。