Current and active
The channel is
If a channel is "active" it might also show a substate giving more detail of exactly what the channel is doing. Note:currentif it is in any state other than inactive. A current channel isactiveunless it is in RETRYING, STOPPED, or STARTING state.
- When a channel is in one of the six states highlighted in Figure 1 (INITIALIZING, BINDING, REQUESTING, RUNNING, PAUSED, or STOPPING), it is consuming resource and a process or thread is running; the channel is active.
- When a channel is in STOPPED state, the session might be active because the next state is not yet known.
Specifying the maximum number of current channels
We can specify the maximum number of channels that can be current at one time. This number is the number of channels that have entries in the channel status table, including channels that are retrying and channels that are stopped. Specify this for your platform:For more information about the values set using the initialization or the configuration file see Configuration file stanzas for distributed queuing. For more information about specifying the maximum number of channels, see the following topics: Note:
- Use the ALTER QMGR MAXCHL command.
- Edit the queue manager initialization file.
- Edit the queue manager configuration file.
- Use the IBM MQ Explorer.
- Server-connection channels are included in this number.
- A channel must be current before it can become active. If a channel is started, but cannot become current, the start fails.
Specifying the maximum number of active channels
We can also specify the maximum number of active channels to prevent your system being overloaded by many starting channels. If we use this method, set the disconnect interval attribute to a low value to allow waiting channels to start as soon as other channels terminate.
Each time a channel that is retrying attempts to establish connection with its partner, it must become an active channel. If the attempt fails, it remains a current channel that is not active, until it is time for the next attempt. The number of times that a channel retries, and how often, is determined by the retry count and retry interval channel attributes. There are short and long values for both these attributes. See Channel attributes for more information.
When a channel has to become an active channel (because a START command has been issued, or because it has been triggered, or because it is time for another retry attempt), but is unable to do so because the number of active channels is already at the maximum value, the channel waits until one of the active slots is freed by another channel instance ceasing to be active. If, however, a channel is starting because it is being initiated remotely, and there are no active slots available for it at that time, the remote initiation is rejected.
Whenever a channel, other than a requester channel, is attempting to become active, it goes into the STARTING state. This state occurs even if there is an active slot immediately available, although it is only in the STARTING state for a short time. However, if the channel has to wait for an active slot, it is in STARTING state while it is waiting.
Requester channels do not go into STARTING state. If a requester channel cannot start because the number of active channels is already at the limit, the channel ends abnormally.
Whenever a channel, other than a requester channel, is unable to get an active slot, and so waits for one, a message is written to the log or the z/OS console, and an event is generated. When a slot is later freed and the channel is able to acquire it, another message and event are generated. Neither of these events and messages are generated if the channel is able to acquire a slot straight away.
If a STOP CHANNEL command is issued while the channel is waiting to become active, the channel goes to STOPPED state. A Channel-Stopped event is raised.
Server-connection channels are included in the maximum number of active channels.
For more information about specifying the maximum number of active channels, see the following topics: