简体   繁体   English

NServiceBus。 MSMQ消息带有响应队列的专用IP,但是我需要公共

[英]NServiceBus. MSMQ message carries private IP of Response queue, but I need public

NServiceBus 5.2.14, NServiceBus.Host 6.0.0, MSMQ Transport, NHibernate Persistence NServiceBus 5.2.14,NServiceBus.Host 6.0.0,MSMQ传输,NHibernate持久性

I need to setup communication between two endpoints via pub/sub. 我需要通过pub / sub设置两个端点之间的通信。 Both have static public IP. 两者都有静态的公共IP。 First is deployed on Azure Classic VM. 首先部署在Azure经典VM上。 Second currently is my dev PC. 当前第二个是我的开发PC。

I'm using "UnicastBusConfig" section for mapping commands and events to endpoint addresses, using public IPs in "Endpoint" attributes. 我正在使用“ UnicastBusConfig”部分,通过“端点”属性中的公共IP将命令和事件映射到端点地址。 Bus.Send() works as expected. Bus.Send()可以正常工作。 But Bus.Publish() and Bus.Reply() tries to send messages to private IPs. 但是Bus.Publish()和Bus.Reply()尝试将消息发送到专用IP。

Subscription messages also carry private IP of subscriber (I've checked Subscription table). 订阅消息还带有订阅者的专用IP(我已经检查了“订阅”表)。

Looks like all the messages send between these two endpoints (in both directions) captures sender's private IP for "Response queue". 看起来在这两个端点之间(双向)发送的所有消息都捕获了“响应队列”的发件人专用IP。 Here is an example of published event that got stuck in outgoing queue. 这是一个已发布事件被卡在传出队列中的示例。 Stuk event Stuk事件

Can I configure my endpoints to use custom address (public IP in my case) for event subscription messages at least (I can live without Bus.Reply()). 我是否可以将端点配置为至少使用事件事件消息的自定义地址(在我的情况下为公共IP)(我可以不使用Bus.Reply()生存)。

I've tried: 1. to use OverridePublicReturnAddress() extension of BusConfiguration; 我尝试过:1.使用BusConfiguration的OverridePublicReturnAddress()扩展; 2. attach IMutateTransportMessages implementation that sets "ReplyToAddress" header. 2.附加设置了“ ReplyToAddress”标头的IMutateTransportMessages实现。 But without any positive result. 但是没有任何积极的结果。

您的Azure VM是否在同一个虚拟网络中,如果可以,则可以使用private进行一些通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM