0

I'm using NServiceBus with MSMQ and I'm trying to send a message from a computer in one domain to another computer in a different domain. A trust exists between the two domains.

The two computers can ping each other, but only if they use the fully-qualified name of the computer, e.g. pc01.mydomain.net.

In the config file on the computer that sends the message, I've ensured my MessageEndpointMappings are correct by setting the Endpoint attribute to be "Endpoint@pc01.mydomain.net". If I try to send a message then it arrives OK at the pc01 endpoint.

However, when the pc01 endpoint tries to send the reply back to the sender (let's say that computer's name is sender01.anotherdomain.net) it fails to deliver the message. When I check Bus.CurrentMessageContext.ReplyToAddress it returns "queuename@sender01". I believe (although I can't prove it) that if the ReplyToAddress was "queuename@sender01.anotherdomain.net" then the reply would arrive in the correct queue as desired.

So I just need a way to ensure the ReplyToAddress has the fully-quailfied name of the computer (sender01.anotherdomain.net) rather than just the computer name (sender01).

Does anyone know how to do this?

4

1 回答 1

1

在发送者上创建一个传出传输消息修改器,相应地更新 ReplyToAddress。

在 v4 中,您可以通过更改 RuntimeEnvironment.MachineNameAction 函数来覆盖我们解析机器名称的方式。

于 2013-04-19T18:17:28.787 回答