The steps described in this topic assume that you are joining:
- A WebSphere Event 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 Event Broker broker
that you have already created.
This is shown in the following diagram.
WebSphere Event 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).
- Ensure that the WebSphere Event Broker broker's
default execution group is successfully deployed. This execution
group is deployed the first time you deploy a newly created WebSphere Event Broker broker.
You can check the status of both the execution group and the broker from the
topology view in the workbench.
- Define the queue required to support interbroker communications
with WebSphere MQ Publish/Subscribe neighbors on the WebSphere Event Broker broker's
queue manager:
define qlocal(SYSTEM.BROKER.INTER.BROKER.COMMUNICATIONS) noshare
- Stop the WebSphere Event Broker broker:
mqsistop SAMPLE_BROKER
- Restart the WebSphere Event Broker broker:
mqsistart SAMPLE_BROKER
When the WebSphere Event Broker broker
is restarted, it is enabled to receive and process messages on the interbroker
queue.
- Create the resources required on the WebSphere Event Broker broker
to support the default WebSphere MQ Publish/Subscribe stream:
- Create the default stream queue:
define qlocal(SYSTEM.BROKER.DEFAULT.STREAM) noshare
- Create a message flow for publish/subscribe, either your own, or one based on the
supplied publish/subscribe message flow:
- Start up the workbench and select the
designer view.
- 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.
- 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.
- 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.
- If you are using additional streams in the WebSphere MQ Publish/Subscribe network,
you must also enable these on the WebSphere Event Broker broker. Although the WebSphere Event 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 Event Broker subscriber
clients.
- Create a local queue on the WebSphere Event Broker broker's
queue manager for each stream on which messages are to be processed. For example:
define qlocal(STREAM.X) noshare
- 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.
- 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.
- 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.
- 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 Event 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.
- Verify the success of the integration:
mqsilistmqpubsub SAMPLE_BROKER
If the
WebSphere Event 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