Redis与Service Bus的发布/订阅场景 [英] Redis vs Service Bus for pub/sub scenario

查看:171
本文介绍了Redis与Service Bus的发布/订阅场景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Azure中有几项服务,我想使用某种发布/订阅服务在它们之间同步更改.

I have several services in Azure and i would like to sync changes between them using some kind of pub/sub service.

我正在研究Redis和Azure Service Bus.

I am looking into Redis and Azure Service Bus.

要同步的数据非常简单-大多数字符串最多为100个字符

The data to be synced is very simple - mostly strings up to 100 characters

我想知道什么是我的首选-或者我的方向是否正确.

I would like to know what is the preferred choice for me - or if i am in the right direction..

我的要求很简单:

  1. 低延迟-许多小操作
  2. 可选-能够在本地而不是在Azure中安装解决方案

推荐答案

请勿为此使用Redis. Redis PubSub不可靠(它是 fire-and-forget ).如果Redis发布消息时没有人在听,会发生什么?它会永远丢失,这意味着您的服务将无法同步...

Don't use Redis for this. Redis PubSub isn't reliable (it's fire-and-forget). What would happen if no one is listening when Redis publishes a message? It's lost forever, and this means that your services won't be synchronized...

也许您没有听说过 Azure Pack .它不是完整的Azure内部部署,但包含 Service Bus .如果从公共或私有云中使用它,应该没有问题.

Maybe you didn't hear about Azure Pack. It's not a full Azure on-premises, but it includes Service Bus. It should be no issue if you use it from the public or private cloud.

请注意,您也许可以使用Redis来实现可靠的消息传递,但不能在默认的 pubsub 之上.

Note that you might be able to implement reliable messaging using Redis, but not on top of default pubsub.

Redis和Service Bus的可能替代品应该是 RabbitMQ .

A possible alternative to both Redis and Service Bus should be RabbitMQ.

这篇关于Redis与Service Bus的发布/订阅场景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆