[MQ 9.4.0 Jun 2024]

Adding a remote queue manager to the IBM MQ Console from the command line

You can add a remote queue manager to the IBM® MQ Console by using the setmqweb remote command on the command line.

Before you begin

Before you begin this task, you must complete the steps in IBM MQ Console: Adding a remote queue manager.

Procedure

  1. Create a JSON CCDT file that contains the connection information for the remote queue manager:
    • Generate a CCDT file by using the IBM MQ Console that is associated with the same installation as the queue manager that you want to connect to remotely.

      From the Home page, click the Download connection file tile.

    • Create a JSON format CCDT file that defines the connection. For more information about creating a JSON format CCDT, see Configuring a JSON format CCDT.

      The CCDT file must include the name, clientConnection, and type information. You can optionally include additional information such as transmissionSecurity information. For more information about all the CCDT channel attribute definitions, see Complete list of CCDT channel attribute definitions.

      The following example shows a basic JSON CCDT file for a remote queue manager connection:

      {
        "channel": [{
            "name": "QM1.SVRCONN",
            "clientConnection": {
              "connection": [{
                  "host": "example.com",
                  "port": 1414
                }],
              "queueManager": "QM1"
            },
            "type": "clientConnection"
          }]
      }
  2. Copy the JSON CCDT file to the system where the IBM MQ Console is running.
  3. From the installation that is running the IBM MQ Console, use the setmqweb remote command to add the remote queue manager information to the IBM MQ Console configuration.
    As a minimum to add a remote queue manager to the IBM MQ Console, you must provide the following details:
    • The queue manager name.
    • A unique name for the queue manager. This unique name differentiates this queue manager from other remote queue managers that might have the same queue manager name. The unique name is the name that is displayed in the IBM MQ Console, so specify a name that makes it clear that the queue manager is a remote queue manager, for example, "remote-QM2".
    • The CCDT URL for the queue manager.
    You can specify several other options, such as the username and password to use for the remote queue manager connection, or details of the truststore and keystore. For a full list of parameters that can be specified with the setmqweb remote command, see setmqweb remote.
    For example, to add the remote queue manager QM1, using the example CCDT file, enter the following command:
    setmqweb remote add -uniqueName "MACHINEAQM1" -qmgrName "QM1" -ccdtURL "c:\myccdts\ccdt.json"

Results

The remote queue manager appears in the remote queue manager list in the IBM MQ Console when the remote connection list is next refreshed. if the connection is successful, you can administer the objects of the remote queue manager in the same way that you work with the objects of a local queue manager.

Example

The following example sets up the remote queue manager connection for a queue manager QM1. The IBM MQ Console is authorized to administer the queue manager based on the authorization that is given to the user exampleUser. The credentials of this user are provided to the IBM MQ Console when the setmqweb remote command is used to configure the connection information for the remote queue manager.
  1. On the system where the remote queue manager QM1 is, a server-connection channel and a listener are created. The listener is started, and authorization is given for user exampleUser to administer the queue manager. For example, on AIX®, Linux®, and Windows, run the following commands:
    runmqsc QM1
    #Define the server connection channel that will accept connections from the Console
    DEFINE CHANNEL(QM1.SVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP)
    # Define the listener to use for the connection from the Console
    DEFINE LISTENER(REMOTE.LISTENER) TRPTYPE(TCP) PORT(1414)
    # Start the listener
    START LISTENER(REMOTE.LISTENER)
    end
    
    #Set mq authorization for exampleUser to access the queue manager
    setmqaut -m QM1 -t qmgr -p exampleUser +connect +inq +setall +dsp
    
  2. On the system where the IBM MQ Console is running, a QM1_ccdt.json file is created with the following connection information:
    {
      "channel": [{
          "name": "QM1.SVRCONN",
          "clientConnection": {
            "connection": [{
                "host": "example.com",
                "port": 1414
              }],
            "queueManager": "QM1"
          },
          "type": "clientConnection"
        }]
    }
    
  3. On the system where the IBM MQ Console is running, the connection information for the remote queue manager QM1 is added to the mqweb server. The credentials for exampleUser are included in the connection information:
    setmqweb remote add -uniqueName "remote-QM1" -qmgrName "QM1" -ccdtURL "c:\myccdts\QM1_ccdt.json" -username "exampleUser" -password "password"
  4. The IBM MQ Console shows the remote queue manager QM1.