加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

使用Windows Azure Service Bus进行邮件路由

发布时间:2020-12-14 04:08:11 所属栏目:Windows 来源:网络整理
导读:我需要花几个小时来了解Azure Service Bus架构.我特别想知道这种排队技术是否可用于支持消息路由 – 类似于RabbitMQ的路由功能. http://www.rabbitmq.com/tutorials/tutorial-four-python.html We will use a direct exchange instead. The routing algorith
我需要花几个小时来了解Azure Service Bus架构.我特别想知道这种排队技术是否可用于支持消息路由 – 类似于RabbitMQ的路由功能.
http://www.rabbitmq.com/tutorials/tutorial-four-python.html

We will use a direct exchange instead. The routing algorithm behind a
direct exchange is simple – a message goes to the queues whose binding
key exactly matches the routing key of the message.

In this setup,we can see the direct exchange X with two queues bound
to it. The first queue is bound with binding key orange,and the
second has two bindings,one with binding key black and the other one
with green.

In such a setup a message published to the exchange with a routing key
orange will be routed to queue Q1. Messages with a routing key of
black or green will go to Q2. All other messages will be discarded.

寻找对服务总线架构有深刻理解的人,以推荐实现此类队列的最佳向量.

Windows Azure Service Bus主题和订阅允许您执行完全相同的操作:

让我们将图像与您的示例进行比较:

>直接交换X将是图像中的DataCollection主题.
> Q1将是Dashboard订阅(过滤器设置为Redmond)
> Q2将是库存订阅(没有过滤器,意味着它将接收所有消息).

它实际上非常简单.您的客户端向主题发送消息(类似于队列)并可以向此消息添加一些元数据(这可以用作绑定密钥).现在您不会从主题本身读取消息,主题会将消息转发给所有订阅.要实现消息路由,您只需使用类似于SQL的语法在一个或多个订阅上设置过滤器.

Python教程:How to Use Service Bus Topics/Subscriptions

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读