Starting and stopping a channel

The way in which a channel is started depends on whether it is a caller channel or a responder channel. When you stop a channel, you can choose whether to stop the channel after the current batch of messages has finished processing, or force the channel to shut down before the current message batch has finished processing.

About this task

Channels can be categorized as either callers or responders. An application starts caller channels either directly, or automatically by using a channel initiator. Responder channels can be started only by the listener.

Note that you must have the required transport protocol, for example, TCP/IP, on the computers at each end of the channel.

Starting a channel manually

About this task

You can start caller channels in IBM® MQ Explorer. When you start responder channels in IBM MQ Explorer, you are actually changing the responder channel's state from Stopped to Inactive; the listener then changes the state from Inactive to Started. You must, therefore, start a listener on your computer if you are using responder channels.

To start a channel, complete the following steps.

Procedure

  1. In the Navigator view, click the Channels folder to display the channels in the Content view.
  2. In the Content view, right-click the channel, then click Start.

Results

The channel starts. The icon next to the channel changes to show that the channel is running.

Stopping a channel

About this task

To stop a channel, complete the following steps.

Procedure

  1. In the Navigator view, click the Channels folder to display the channels in the Content view.
  2. In the Content view, right-click the channel, then click Stop....
    The Stop Channel dialog opens.
  3. Select how IBM MQ stops the channel:
    • Accept the default values (do not select the check boxes) to end the channel after the current batch of messages has finished processing (on Windows, Linux®, UNIX, or IBM i), or to end the channel after the current message (on z/OS®). For a receiving channel, if there is no batch in progress, the channel waits for either the next batch or the next heartbeat (if heartbeats are being used) before stopping. For server-connection channels, the channel stops when the connection ends.
    • Select the Force interruption of current message batch check box to terminate the transmission of any current batch; the channel's thread or process is not terminated. This is likely to result in in-doubt channels. For server-connection channels, the current connection is broken.
    • Select the Allow process/thread termination check box if you select the Force interruption of current message batch check box and you want to terminate the channel thread or process.
  4. If the channel definition is a responder channel, multiple queue managers or remote connections can be using the same responder channel. You can, therefore, filter which channels are stopped: select the relevant check box then type the name of the queue manager or remote connection.
  5. Select the state that the channel will change to when it stops:
    • Click Stopped to stop the channel but keep the process or thread running; the channel is still active and consuming resources.
    • Click Inactive to stop the channel, including stopping the process or thread; the channel is inactive and is not consuming resources.

Results

The channel stops running. The icon next to the channel changes to show that the channel is no longer running.