Channels

A channel is a logical communication link, used by distributed queue managers, between an IBM MQ MQI client and an IBM MQ server, or between two IBM MQ servers.

Channels are objects that provide a communication path from one queue manager to another. Channels are used to move messages from one queue manager to another and they shield applications from the underlying communications protocols. The queue managers might exist on the same system, or a different systems on the same platform, or on different platforms. The messages that are sent can originate from many places:

  • User-written application programs that transfer data from one node to another.
  • User-written administration applications that use PCF commands or the MQAI.
  • The IBM MQ Explorer.
  • Queue managers that send instrumentation event messages to another queue manager.
  • Queue managers that send remote administration commands to another queue manager. For example, using MQSC commands or the administrative REST API.

A channel has two definitions: one at each end of the connection. For queue managers to communicate with one another, we must define one channel object at the queue manager that is to send messages, and another, complementary one, at the queue manager that is to receive them. The same channel name must be used at each end of the connection, and the channel type used must be compatible.

There are three categories of channel in IBM MQ, with different channel types within these categories:

  • Message channels, which are unidirectional, and transfer messages from one queue manager to another.
  • MQI channels, which are bidirectional, and transfer MQI calls from an IBM MQ MQI client to a queue manager, and responses from a queue manager to an IBM MQ client.
  • AMQP channels, which are bidirectional and connect an AMQP client to a queue manager on a server machine. IBM MQ uses AMQP channels to transfer AMQP calls and responses between AMQP applications and queue managers


Message channels

The purpose of a message channel is to transfer messages from one queue manager to another. Message channels are not required by the client server environment.

Figure 1. Message channels between two queue managers

A message channel is a one-way link. If we want a remote queue manager to respond to messages sent by a local queue manager, we must set up a second channel to send responses back to the local queue manager.

A message channel connects two queue managers by using message channel agents (MCAs). There is a message channel agent at each end of a channel. We can allow an MCA to transfer messages using multiple threads. This process is known as pipelining. Pipelining enables the MCA to transfer messages more efficiently, improving channel performance. For more information about pipelining, see Attributes of channels.

For more information about channels, see Channel-exit calls and data structures, and Distributed queuing components.


MQI channels

A Message Queue Interface (MQI) channel connects an IBM MQ MQI client to a queue manager on a server machine, and is established when we issue an MQCONN or MQCONNX call from an IBM MQ MQI client application.

It is a two-way link and is used for the transfer of MQI calls and responses only, including MQPUT calls that contain message data and MQGET calls that result in the return of message data. There are different ways of creating and using the channel definitions (see Defining MQI channels ).

Figure 2. Client-connection and server-connection on an MQI channel

An MQI channel can be used to connect a client to a single queue manager, or to a queue manager that is part of a queue sharing group (see Connect a client to a queue sharing group ).

There are two channel types for MQI channel definitions. They define the bi-directional MQI channel.


AMQP channels

There is only one type of AMQP channel.

You use the channel to connect an AMQP messaging application with a queue manager, enabling the application to exchange messages with IBM MQ applications. An AMQP channel allows you to develop an application using MQ Light, and then deploy it as an enterprise application, taking advantage of the enterprise-level facilities provided by IBM MQ.


Channel definitions

See Channel definitions for descriptions of each type of channel.

  • Channel definitions
    Tables describing the different types of message channels and MQI channels that IBM MQ uses.

Parent topic: Object types


Related concepts


Related reference


Related information