Create the queue

Create the local queue that is used to receive messages on the target queue manager, and the listener that accepts the inbound channel connection.


After you have started the runmqsc scripting tool, we can use MQSC commands to create a local queue and listener.


Procedure

  1. Start the scripting tool by typing the following command:
    runmqsc QM2
    
    A message is displayed to confirm that the tool has started.
  2. Create a local queue called RECEIVEQUEUE. The queue must have the same name as referred to in the remote queue definition on the source queue manager. In the MQSC interface, type:
    DEFINE QLOCAL(RECEIVEQUEUE) DESCR('Receiving queue')
    
    The local queue is created.
  3. Create a listener called LISTENER1. In the MQSC interface, type:
    DEFINE LISTENER(LISTENER1) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
    
    Note: Port 1414 is the default port for IBM MQ . If you chose a different port number, we must add it to the CONNAME of the sender channel on the sending queue manager.
  4. Start the listener so it is ready to accept inbound connections. In the MQSC interface, type:
    START LISTENER(LISTENER1)
    
    Note: Since the listener was created with the option CONTROL(QMGR), next time the queue manager is started, the listener will also be automatically started.
  5. Type end to exit the MQSC interface.


What to do next

To create the receiver channel to create the connection between the source and target queue managers, follow the instructions in Create the receiver channel. Parent topic: Create the distributed queue manager topology Previous topic: Create the queue manager Next topic: Create the receiver channel