NServiceBus distributor worker create a queue called PRIVATE$\order_queue$

563 Views Asked by At

I have created an NServiceBus Distributor and Worker, running on separate machines. When I run the worker, it successfully sends a message to the Distributor (and I can see it processed through the Storage queue) but for some reason an output queue is created on the Distributor called

'DIRECT=TCP:xx.xx.xx.xx\PRIVATE$\order_queue$ when the queue should be called 'DIRECT=OS:WORKERDNSNAME\private$\myqueue'.

Does anyone know why the order_queue$ is being created?

1

There are 1 best solutions below

0
On

Shameless copy direct from an old post at pg2e.blogspot.co.uk:

Transactional queues over HTTP from private networks

When sending messages to a transactional queue over http/s from a server without a public ip address the ACK-messages may have a hard time reaching their destination. This is due to the same cause as in this post (Basically NATting causing a mismatch with the message destination address).

By default the receipts are sent to the sending computers name, which of course will not work unless both parties resides on the same network. To fix this you have to map the receipts to the public address of the sender. This is done by creating an xml-file (of any name) in C:\WINDOWS\system32\msmq\mapping with the following content.

<StreamReceiptSetup xmlns="msmq-streamreceipt-mapping.xml"> 
    <setup> 
        <LogicalAddress>http://msmq.domain.com/*</LogicalAddress>
        <StreamReceiptURL>http://[ADDRESS_TO_SENDER]/msmq/Private$/order_queue$</StreamReceiptURL>
    </setup>
    <default>http://xxx.xx.xxx.xx/msmq/Private$/order_queue$</default>
</StreamReceiptSetup>

Explanation: All messages sent to any queue at msmq.domain.com will have their receipts sent to the given StreamReceiptURL. The order_queue$ queue is used to handle transactional control messages.

I suspect later versions of MSMQ or NServiceBus handle creating this queue automatically without you having to create the XML file yourself.