Adding a broker as a leaf 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 leaf 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 WBRK_BROKER is joined to the WebSphere MQ Publish/Subscribe network, with broker MQPS_BROKER1 as its parent broker.

Adding a <ph conref='edvent.dita#edvent/mqsi'></ph> broker as a leaf 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 WBRK_BROKER
  4. Restart the WebSphere Message Broker broker:
    mqsistart WBRK_BROKER

    When the WebSphere Message Broker broker is restarted, the presence of the interbroker queue (defined above) enables the broker to receive and process messages on this 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 based on the supplied publish/subscribe message flow:
      1. Start up the workbench and select the designer view.
      2. If you have not already imported and saved the default message flows supplied, import these now. This enables you to reuse the default publish/subscribe flow here. Click File > Import and open the file, called SamplesWorkspaceForImport, in the examples subdirectory within the WebSphere Message Broker home directory. This might take a few minutes to complete.

        If you prefer, you can create your own message flow.

      3. Make a copy of the supplied message flow and rename it.
      4. 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.
      5. Finally, check in your changes and deploy the message flow to the default execution group of the broker WBRK_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 (this is the default setting).

  7. Ensure that the WebSphere MQ Publish/Subscribe broker is running. If it is not, you can start it using the start command:
    strmqbrk MQPS_BROKER1
  8. Ensure that the WebSphere MQ connection between the two brokers is enabled; you must start the listeners for the receiver channels, and you must then start the sender channels.
  9. Join the WebSphere Message Broker broker to the WebSphere MQ Publish/Subscribe network as a child of the WebSphere MQ Publish/Subscribe broker:
    mqsijoinmqpubsub WBRK_BROKER -p MQPS_BROKER1
  10. Verify the success of the join command to ensure that the WebSphere MQ Publish/Subscribe broker is an active neighbor:
    mqsilistmqpubsub WBRK_BROKER
    If the join command has completed successfully, you see a response to the list command that is similar to:
    BIP8090I: WebSphere MQ Publish/Subscribe neighbor WBRK_BROKER
          is active
    
    BIP8091I: Common stream    SYSTEM.BROKER.DEFAULT.STREAM
    BIP8091I: Common stream    STREAM.X
     
Related tasks
Adding a broker as a parent node