使用 Redis 进行 Pub Sub 。相对于 RabbitMQ 的优点/缺点
我们的要求很简单。向订阅主题的用户发送消息。我们需要我们的消息系统能够近乎实时地支持数百万个主题,甚至可能支持任何给定主题的数百万订阅者。我们的应用程序是用 Java 构建的。
由于社区支持、文档和功能(可能它将提供我们需要的一切),我们几乎决定使用 RabbitMQ。但我非常倾向于使用 Redis,因为它看起来很有前途且轻量级。老实说,我对 Redis 作为消息传递系统的了解有限,但是看到越来越多的公司使用它作为队列(使用 Ruby Resque),我想知道 Java 中是否有像 Resque 这样的产品以及有哪些优点或使用 Redis 作为 MQ 相对于 RabbitMQ 的缺点。
Our requirement is very simple. Send messages to users subscribed to a topic. We need our messaging system to be able to support millions of topics and maybe millions of subscribers to any given topic in near real time. Our application is built with Java.
We almost decided on RabbitMQ because of the community support, documentation and features (possibly it will deliver everything we need). But I am very inclined towards using Redis because it looks promising and lightweight. Honestly I have limited understanding about Redis as a messaging system, but looking at a growing number of companies using it as a queuing(with Ruby Resque), I want to know if there is an offering like Resque in Java and what are the advantages or disadvantages of using Redis as a MQ over RabbitMQ.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
RabbitMQ 支持集群,现在具有主动/主动高可用性队列,允许使用开箱即用的 Redis 实现更大的横向扩展和可用性选项。
RabbitMQ 使您能够更好地控制一切,从交换/队列的用户/权限,到特定交换或队列的持久性(磁盘与内存),再到交付保证(交易、发布者确认)。
它还允许您的拓扑(扇出、主题、直接)以及路由到多个队列、具有私有队列和回复的 RPC 等方面具有更大的灵活性和选项。
RabbitMQ supports clustering and now has active/active High Availably queues allowing for greater scale out and availability options then possible with Redis out of the box.
RabbitMQ gives you a greater amount of control on everything from the users/permissions of exchanges/queues, to the durability of a specific exchange or queue (disk vs memory), to the guarantees of delivery (transactions, Publisher Confirms).
It also allows for more flexibility and options on your topologies (fanout, topic, direct) and routing to multiple queues, RPC with private queues and reply-to, etc.