I have different environments for my application (Dev -> Test -> Prod) and I use MSMQ.
I also have the name of the queues (these are remote queues) that I use through configuration files in the following format:
FormatName:Direct=SERVER_NAME\Private$\MY_QUEUE
My problem is that SERVER_NAME is different in different environments, and I would like to delegate this problem to the server (i.e. for databases, I have aliases with the same name on all 3 servers, and each of them points to the actual db server )
I tried adding the queue server to the hosts file, but the following error failed:
The queue does not exist or you do not have sufficient privileges to perform the operation.
I tried FormatName:Direct, FormatName:OSandFormatName:TCP
Any help (workaround, new ideas on how to make this work) would be greatly appreciated.
The goal is to have one configuration file that will work in all environments.
source
share