subtlety
subtlety

Reputation: 13

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

I need to setup communication between two endpoints via pub/sub. Both have static public IP. First is deployed on Azure Classic VM. Second currently is my dev PC.

I'm using "UnicastBusConfig" section for mapping commands and events to endpoint addresses, using public IPs in "Endpoint" attributes. Bus.Send() works as expected. But Bus.Publish() and Bus.Reply() tries to send messages to private IPs.

Subscription messages also carry private IP of subscriber (I've checked Subscription table).

Looks like all the messages send between these two endpoints (in both directions) captures sender's private IP for "Response queue". Here is an example of published event that got stuck in outgoing queue. Stuk event

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()).

I've tried: 1. to use OverridePublicReturnAddress() extension of BusConfiguration; 2. attach IMutateTransportMessages implementation that sets "ReplyToAddress" header. But without any positive result.

Upvotes: 0

Views: 140

Answers (1)

Greg
Greg

Reputation: 36

Does your Azure VM in the same Virtual network, if so, you can use private to do some communication.

Upvotes: 0

Related Questions