Adding a broker as a parent node

The steps described in this topic assume that you are joining:
  • A WebSphere Message Broker broker named WBRK_BROKER. When this broker was created, the same name was specified for the queue manager.
  • A WebSphere MQ Publish/Subscribe broker network with a root broker MQPS_ROOT_BROKER, and two leaf brokers MQPS_BROKER1 and MQPS_BROKER2.

Substitute the names of your brokers for these examples wherever they are used.

All commands shown must be issued on the system on which the appropriate resource is defined. WebSphere MQ commands (for example, the command to define a queue) are shown in MQSC format. For more information about WebSphere MQ commands, refer to your WebSphere MQ documentation.

The following steps describe what you should do to add, as a parent node within your WebSphere MQ Publish/Subscribe broker network, a WebSphere Message Broker broker that you have already created.

This is shown in the following diagram. WebSphere Message Broker broker SAMPLE_BROKER is joined to the WebSphere MQ Publish/Subscribe network as the new parent node (that is, as the parent of the original parent node MQPS_ROOT_BROKER).

Adding a <ph conref='edvent.dita#edvent/mqsi'></ph> broker as a parent node
  1. Ensure that the WebSphere Message Broker broker's default execution group is successfully deployed. This execution group is deployed the first time you deploy a newly created WebSphere Message Broker broker. You can check the status of both the execution group and the broker from the topology view in the workbench.
  2. Define the queue required to support interbroker communications with WebSphere MQ Publish/Subscribe neighbors on the WebSphere Message Broker broker's queue manager:
    define qlocal(SYSTEM.BROKER.INTER.BROKER.COMMUNICATIONS) noshare
  3. Stop the WebSphere Message Broker broker:
    mqsistop SAMPLE_BROKER
  4. Restart the WebSphere Message Broker broker:
    mqsistart SAMPLE_BROKER

    When the WebSphere Message Broker broker is restarted, it is enabled to receive and process messages on the interbroker queue.

  5. Create the resources required on the WebSphere Message Broker broker to support the default WebSphere MQ Publish/Subscribe stream:
    1. Create the default stream queue:
      define qlocal(SYSTEM.BROKER.DEFAULT.STREAM) noshare
    2. Create a message flow for publish/subscribe, either your own, or one based on the supplied publish/subscribe message flow:
      1. Start up the workbench and select the designer view.
      2. Make a copy of the supplied message flow and rename it; you must import this default message flow before you can access and use it.
      3. Check the properties of the nodes in the message flow. You must set the appropriate input (stream) queue property for the MQInput node. Check that the other properties of the nodes are set correctly for your requirements.
      4. Finally, deploy the message flow to the default execution group of the broker SAMPLE_BROKER.

      You can find full details of how to complete these steps in the online help for the workbench.

  6. If you are using additional streams in the WebSphere MQ Publish/Subscribe network, you must also enable these on the WebSphere Message Broker broker. Although the WebSphere Message Broker broker is able to support all the streams of its WebSphere MQ Publish/Subscribe neighbors, you need only define queues, and define and deploy message flows, for those streams requested by WebSphere Message Broker subscriber clients.
    1. Create a local queue on the WebSphere Message Broker broker's queue manager for each stream on which messages are to be processed. For example:
      define qlocal(STREAM.X) noshare
    2. Create and deploy a message flow to read and process the WebSphere MQ Publish/Subscribe messages that are sent to each stream (publication) queue.

      You can use the supplied publish/subscribe message flow as the basis for each new message flow. Each MQInput node representing a non-default stream must have the property implicitStreamNaming set.

  7. Enter the following WebSphere MQ Publish/Subscribe command against the broker that is the current WebSphere MQ Publish/Subscribe parent broker, to terminate its activities:
    endmqbrk -c -m MQPS_ROOT_BROKER

    This requests a controlled shutdown (-c). When the shutdown has completed, the broker can be restarted. You can request an immediate shutdown, by specifying -iinstead of -c, if you need to force this shutdown to complete.

  8. Ensure that the WebSphere MQ connection between the two brokers is active; you must start the listeners for the receiver channels, and then start the sender channels.
  9. Enter the following WebSphere MQ Publish/Subscribe command against the current WebSphere MQ Publish/Subscribe parent broker to restart it:
    strmqbrk -m MQPS_ROOT_BROKER -p SAMPLE_BROKER

    If the queue manager associated with the WebSphere Message Broker broker SAMPLE_BROKER has not been created with the same name as the broker, you must specify the queue manager name here after the -p flag, not the broker name.

  10. Verify the success of the integration:
    mqsilistmqpubsub SAMPLE_BROKER
    If the WebSphere Message Broker broker has been integrated into the WebSphere MQ Publish/Subscribe network successfully, you see a response that is like the following:
    BIP8090I: WebSphere MQ Publish/Subscribe neighbor SAMPLE_BROKER
       is active
    
    BIP8091I: Common stream    SYSTEM.BROKER.DEFAULT.STREAM
    BIP8091I: Common stream    STREAM.X
     
Related tasks
Adding a broker as a leaf node