Sample routing exit
A sample routing exit program is provided with WebSphere MQ Publish/Subscribe (see Sample programs).
The exit sample is invoked using the RoutingExitPath in
the Broker stanza of queue manager initialization file (see Broker configuration stanza).
The sample program changes either the destination queue or queue manager,
depending upon the parameters supplied, as follows:
- If the destination of the message is an application, and the stream name
is the default stream:
- If the destination queue name is Q1, change it to Q2
- If the destination queue name is Q2, change it to Q3
- If the destination queue name is Q3, change it to Q4
- If the destination of the message is a broker, and the stream name is MY.ROUTING.STREAM:
- If the destination queue manager is queue manager 1, change it to queue
manager 2.
- If the destination queue manager is queue manager 2, change it to queue
manager 3.
- If the destination queue manager is queue manager 3, change it to queue
manager 4.