I have a setup where I have a chain of servers that I need to send messages between:
A -> B
On A I have an application which puts a message on a local MSMQ queue. This queue needs to forward the message to a MSMQ queue on B.
The messages do not need to be transactional.
I've enabled HTTP support under the Windows Message Queuing feature. I've added a mapping file under the System32/msmq/mappings folder looking like this:
<redirections xmlns="msmq-queue-redirections.xml"> <redirection> <from>http://A/msmsq/private$/logger</from> <to>http://B/msmq/private$/logger</to> </redirection> </redirections>
I am using powershell to send the messages to the queue on A like this:
Get-MsmqQueue -name logger | Send-MsmqQueue -body "test message" -label "test"
When the messages are placed on the queue on A they are not redirected to B, they stay on the A queue.
How should I configure A and B so that messages are forwarded from the MSMQ on A to the MSMQ on B?
In the real scenario there are more servers involved in the chain and each server is only allowed to communicate with the next server in the chain. At the last server in the chain an application reads from the queue on that server and inserts the messages into a DB.