Preparing channels and transmission queues for remote administration

To run MQSC commands remotely, set up two channels, one for each direction, and their associated transmission queues. This example assumes that you are using TCP/IP as the transport type and that you know the TCP/IP address involved.

The channel source.to.target is for sending MQSC commands from the source queue manager to the target queue manager. Its sender is at source.queue.manager and its receiver is at target.queue.manager. The channel target.to.source is for returning the output from commands and any operator messages that are generated to the source queue manager. You must also define a transmission queue for each channel. This queue is a local queue that is given the name of the receiving queue manager. The XMITQ name must match the remote queue manager name in order for remote administration to work, unless you are using a queue manager alias. Figure 8 summarizes this configuration.

Figure 8. Setting up channels and queues for remote administration
 A diagram showing you how to set up channels and queues for remote administration. The channel source.to.target sends MQSC commands from the source queue manager (source.queue.manager) to the target queue manager (target.queue.manager). The channel target.to.source returns the output from commands and any operator messages that are generated to the source queue manager. You must also define a transmission queue for each channel. In the diagram, source.queue.manager contains an XMITQ definition of target.queue.manager; target.queue.manager contains an XMITQ definition of source.queue.manager.

See WebSphere MQ Intercommunication for more information about setting up channels.

Defining channels, listeners, and transmission queues

On the source queue manager (source.queue.manager), issue the following MQSC commands to define the channels, listener, and the transmission queue:

  1. Define the sender channel at the source queue manager:
      DEFINE CHANNEL ('source.to.target') +
             CHLTYPE(SDR) +
             CONNAME (RHX5498) +
             XMITQ ('target.queue.manager') +
             TRPTYPE(TCP)
  2. Define the receiver channel at the source queue manager:
      DEFINE CHANNEL ('target.to.source') +
             CHLTYPE(RCVR) +
             TRPTYPE(TCP)
  3. Define the listener on the source queue manager:
      DEFINE LISTENER ('source.queue.manager') +
             TRPTYPE (TCP)
  4. Define the transmission queue on the source queue manager:
      DEFINE QLOCAL ('target.queue.manager') +
             USAGE (XMITQ)

Issue the following commands on the target queue manager (target.queue.manager), to create the channels, listener, and the transmission queue:

  1. Define the sender channel on the target queue manager:
      DEFINE CHANNEL ('target.to.source') +
             CHLTYPE(SDR) +
             CONNAME (RHX7721) +
             XMITQ ('source.queue.manager') +
             TRPTYPE(TCP)
  2. Define the receiver channel on the target queue manager:
      DEFINE CHANNEL ('source.to.target') +
             CHLTYPE(RCVR) +
             TRPTYPE(TCP)
  3. Define the listener on the target queue manager:
      DEFINE LISTENER ('target.queue.manager') +
             TRPTYPE (TCP)
  4. Define the transmission queue on the target queue manager:
      DEFINE QLOCAL ('source.queue.manager') +
             USAGE (XMITQ)
Note:
The TCP/IP connection names specified for the CONNAME attribute in the sender channel definitions are for illustration only. This is the network name of the machine at the other end of the connection. Use the values appropriate for your network.

Starting the listeners and channels

Start both listeners by using the following MQSC commands:

  1. Start the listener on the source queue manager, source.queue.manager, by issuing the following MQSC command:
     START LISTENER ('source.queue.manager')
  2. Start the listener on the target queue manager, target.queue.manager, by issuing the following MQSC command:
     START LISTENER ('target.queue.manager')

Start both sender channels by using the following MQSC commands:

  1. Start the sender channel on the source queue manager, source.queue.manager, by issuing the following MQSC command:
     START CHANNEL ('source.to.target')
  2. Start the sender channel on the target queue manager, target.queue.manager, by issuing the following MQSC command:
     START CHANNEL ('target.to.source')
Automatic definition of channels

If WebSphere MQ receives an inbound attach request and cannot find an appropriate receiver or server-connection channel, it creates a channel automatically. Automatic definitions are based on two default definitions supplied with WebSphere MQ: SYSTEM.AUTO.RECEIVER and SYSTEM.AUTO.SVRCONN.

You enable automatic definition of receiver and server-connection definitions by updating the queue manager object using the MQSC command, ALTER QMGR (or the PCF command Change Queue Manager).

For more information about creating channel definitions automatically, see WebSphere MQ Intercommunication. For information about automatically defining channels for clusters, see WebSphere MQ Queue Manager Clusters.