问题描述
我们很想听听ActiveMQ,RabbitMQ,ZeroMQ的优缺点.也欢迎提供有关任何其他有趣消息队列的信息.
We'd be interested to hear any experiences with the pros and cons of ActiveMQ vs RabbitMQ vs ZeroMQ. Information about any other interesting message queues is also welcome.
推荐答案
编辑:我的最初答案非常关注AMQP.我决定重写它,以提供对该主题的更广泛的了解.
My initial answer had a strong focus on AMQP. I decided to rewrite it to offer a wider view on the topic.
这3种消息传递技术在构建分布式系统上有不同的方法:
These 3 messaging technologies have different approaches on building distributed systems :
RabbitMQ 是AMQP协议(与Apache Qpid一起)的主要实现之一.因此,它实现了代理体系结构,这意味着消息在发送给客户端之前先在中央节点上排队.这种方法使RabbitMQ非常易于使用和部署,因为仅几行代码就支持了路由,负载平衡或持久消息队列等高级方案.但是,由于中央节点增加了等待时间,并且消息包络很大,因此它也使可伸缩性和速度变慢".
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 是一种非常轻巧的消息传递系统,专门为高吞吐量/低延迟的方案(如您在金融界发现的方案)而设计. Zmq支持许多高级消息传递方案,但与RabbitMQ相反,您必须自己结合框架的各个部分(例如:套接字和设备)来实现大多数方案. Zmq非常灵活,但是您必须研究指南的80页左右(其中我建议所有编写分布式系统的人都阅读,即使您不使用Zmq),也可以做比在2个同级之间发送消息更复杂的事情.
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一样,实施高级方案更加容易,但通常会牺牲原始性能.这是瑞士传递信息的军刀:-).
ActiveMQ is in the middle ground. Like Zmq, it can be deployed with both broker and P2P topologies. Like RabbitMQ, it’s easier to implement advanced scenarios but usually at the cost of raw performance. It’s the Swiss army knife of messaging :-).
最后,所有3个产品:
- 具有适用于最常用语言(C ++,Java,.Net,Python,Php,Ruby等的客户端api)
- 拥有强大的文档资料
- 受到积极支持
这篇关于ActiveMQ或RabbitMQ或ZeroMQ或的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!