MSMQ Adapter 6.0 | webMethods MSMQ Adapter Documentation | webMethods MSMQ Adapter Installation and User’s Guide Documentation | Adapter Connections | Dynamically Changing a Service's Connection at Run Time
 
Dynamically Changing a Service's Connection at Run Time
Using Integration Server, you can run a service using a connection other than the default connection that was associated with the service when the service was created. To override the default, you must code your flow to pass a value through the pipeline into a service's $connectionName field.
For example, you have a flow whose purpose is to take input from one queue and direct it to one of three output queues, each representing a department within your company-billing, shipping, and personnel. Each document in the input queue contains a field called Recipient. One MSMQ service could act as a router, using the value in the input document's Recipient field to set the value for $connectionName. Then the flow would use $connectionName to dynamically pick a connection (output queue) to use to send the input to the appropriate corporate department.
Keep in mind these restrictions when using dynamic connections:
*The connection with which you override the default (that is, the value provided for $connectionName) must be configured to use the same connection type as the default connection.
*The $connectionName field is present only in services created with Designer.
For more information, see Changing the Connection Associated with an Adapter Service at Run Time.