NServiceBus 如何从 1 个逻辑服务的 2 个物理位置发布消息 [英] NServiceBus How To Publish Message From 2 Physical Locations Of 1 Logical Service
本文介绍了NServiceBus 如何从 1 个逻辑服务的 2 个物理位置发布消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以从部署到 2 个物理位置的 1 个逻辑服务发布消息?
is it possible to publish a message from 1 logical service that is deployed to 2 physical locations?
配置文件会是什么样子?您不能在订阅者中添加消息 2 次.但如果您想订阅 2 个队列,则必须这样做.
how would the config file look like? you cannot add a message in your subscriber 2 times. but you must if you want to subscribe to 2 queues.
推荐答案
是的,很有可能.我们现在正在做.诀窍是拥有共享或复制的订阅存储.这是它的工作原理:
Yes, it's very possible. We're doing it right now. The trick is to have either a shared or replicated subscription store. Here's how it works:
- 订阅请求(在订阅者的应用配置文件中定义)被发送到发布者的端点.
- 发布者将请求添加到其订阅存储中,该存储通常是一个关系数据库.
- 如果共享/复制数据库,所有发布者端点都会知道新订阅者.
- 所有发布者端点都将能够发布,订阅者将能够接收所需的消息.
这篇关于NServiceBus 如何从 1 个逻辑服务的 2 个物理位置发布消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文