NServiceBus on-premise/Azure 混合设置

NServiceBus on-premise/Azure hybrid setup

我目前有一个使用 NServiceBus 和 MSMQ 的本地设置。有一个 ServiceControl 实例,它接收所有错误和审计消息。

现在我正在做一个新项目,它将使用 Azure 进行托管,即我将使用 RabbitMQ 作为 tansport 在 Azure 中托管各种 NServiceBus 端点(可能使用 Kubernetes 或 Service Fabric),我希望 Azure 端点能够与本地端点通信,反之亦然。

我偶然发现了社区驱动的项目 NServiceBus.Bridge,它似乎对这种情况很有用。但是我有一些不确定性。

您看到的是一种混合解决方案。使用 NServiceBus.Bridge is a valid approach to connect NServiceBus endpoints/Particular Platform when they are not on the same transport. There's a sample project 演示 RabbitMQ 和 MSMQ 的混合解决方案。

Where would be the best location for hosting the Bridge endpoint, on-premise or Azure?

处理 MSMQ,您希望桥接进程尽可能接近 MSMQ 端点。

How do I handle error, audit and control (e.g. Heartbeat) messages,

至于error、audit、heartbeat等消息,应该由ServiceControl Transpor Adapter. There's a sample for RabbitMQ as well here处理。