Create different outbound queues for different message types for IBM MQ

We can create different outbound queues for different message types for IBM MQ.


Procedure

  1. Create a JMS queue definition, for example, JMSOutboundQueueCustom, in the WebSphere Application Server Administration Console. See Creating IBM MQ messaging provider queue destinations for more information..

  2. Open the Administration Console.

  3. Click Configuration > Message Types. The Change Message Transport Assignment is displayed if we are changing an existing message type. If we are creating a new message type the New Message Transport Assignment is displayed. In the Parameters section of the outbound queue you will use for this message type, specify the JMS object name, for example, JMSOutboundQueueCustom.

  4. To set the queue destination in custom code, we must use the following method of the SendMsgCmd command:

      public void setConfigData(String key, String value)

    The parameter name for the outbound queue is outQueue.For example:

      msg.setConfigData("outQueue", "JMSOutboundQueueCustom");

    See Configuration of transport services used for a message for more details on using the setConfigData method of SendMsgCmd.