Creating and using AMQP channels
When you install the IBM® MQ support for the AMQP Service Component into your IBM MQ installation, you can run IBM MQ MQSC commands (runmqsc) to define, alter, delete, start, and stop a channel. You can also view the status of a channel.
Before you begin
To make a test connection to the queue manager, you can use any AMQP clients that implement the OASIS AMQP 1.0 protocol, such as MQ Light and Apache Qpid clients like Apache Qpid Proton and Apache Qpid JMS.
This task is based on the MQ Light Node.js client. However, the steps relating to the IBM MQ queue manager are the same for any client.
About this task
The following procedure assumes that you have an existing queue manager.
If you require a new queue manager, a sample script is included, which is
located in the mqinstall/amqp/samples directory. The script
creates a new queue manager, starts the AMQP service, creates a new channel called
SAMPLE.AMQP.CHANNEL, and starts the channel.
![[Long Term Support]](nglts.gif)
![[Windows]](ngwin.gif)
If you run the sample script, either
SampleMQM.sh on Linux, or
SampleMQM.bat on Windows, you can start
the following procedure at 6.
You can use the default channel, SYSTEM.DEF.AMQP, to test MQ Light connections to the queue manager, or you can create a new
channel.
From IBM MQ 9.2.2, you can use only the
default channel, SYSTEM.DEF.AMQP, to test MQ Light
connections to the queue manager.
The following procedure uses the default channel.
Procedure
What to do next
DISPLAY CONN(*) TYPE(CONN) WHERE (CHANNEL EQ SYSTEM.DEF.AMQP)- Displays the IBM MQ connection that the AMQP channel made on the queue manager.
DISPLAY CHSTATUS(*) CHLTYPE(AMQP) CLIENTID(*) ALL- Displays a list of the AMQP clients connected to the specified channel.
STOP CHANNEL (MY.AMQP.CHANNEL)- Stops an AMQP channel, and closes the port that it is listening on.
DELETE CHANNEL (MY.AMQP.CHANNEL)- Deletes any channels that you created.Note: Do not delete the default channel SYSTEM.DEF.AMQP.
- Using runmqsc, display the attributes of the queue manager and check for
AMQPCAP(YES). - Using PCF, use the MQCMD_INQUIRE_Q_MGR command, and confirm the value of
MQIA_AMQP_CAPABILITY.
![[AIX]](ngaix.gif)
From