Additional setup for publish/subscribe mode

 

+

Search Tips   |   Advanced Search

 

Before we can use the WebSphere MQ JMS implementation of JMS publish/subscribe, some additional setup is required:

You also need to know publish/subscribe concepts

Ensure that you have access to a publish/subscribe broker

With WebSphere MQ JMS, you have the choice of these brokers:

  • WebSphere MQ Publish/Subscribe
  • WebSphere MQ Integrator, V2
  • WebSphere MQ Event Broker, V2.1
  • WebSphere Business Integration Event Broker, V5.0
  • WebSphere Business Integration Message Broker, V5.0

Differences between these brokers are discussed in Writing WebSphere MQ JMS publish/subscribe applications. Read the documentation for each broker for installation and configuration instructions.

Note, however, that broker based subscription stores are not supported by WebSphere MQ Integrator, V2. For more information about subscription stores, see Subscription stores.

Ensure that the broker is running

WebSphere MQ Publish/Subscribe

To verify that the broker is installed and running, use the command:
dspmqbrk -m MY.QUEUE.MANAGER
where MY.QUEUE.MANAGER is the name of the queue manager on which the broker is running. If the broker is running, a message similar to the following is displayed:
WebSphere MQ message broker for queue manager MY.QUEUE.MANAGER running.

If the operating system reports that it cannot run the dspmqbrk command, ensure that the WebSphere MQ Publish/Subscribe broker is installed properly.

If the operating system reports that the broker is not active, start it using the command:

strmqbrk -m MY.QUEUE.MANAGER

WebSphere MQ Integrator, V2, WebSphere Business Integration Event Broker, V5.0, or WebSphere Business Integration Message Broker, V5.0

To verify that the broker is installed and running, refer to the product documentation.

The command to start the broker is:

mqsistart MYBROKER

...where MYBROKER is the name of the broker.

WebSphere MQ Event Broker, V2.1

To verify that the broker provided in WebSphere MQ Event Broker is installed and running, refer to the product documentation.

The command to start the broker in WebSphere MQ Event Broker is:

wmqpsstart MYBROKER

...where MYBROKER is the name of the broker.

Create the WebSphere MQ JMS system queues

This does not apply if you use a direct connection to a broker.

For a publish/subscribe implementation to work correctly, create a number of system queues. A script is supplied, in the bin subdirectory of the WebSphere MQ JMS installation, to assist with this task. To use the script, enter the following commands:

For i5/OS:

  1. Copy the script from the integrated file system to a native file system library using a command similar to:
    CPYFRMSTMF FROMSTMF('/QIBM/ProdData/mqm/java/bin/MQJMS_PSQ.mqsc')
               TOMBR('/QSYS.LIB/QGPL.LIB/QCLSRC.FILE/MQJMS_PSQ.MBR')

  2. Call the script file using STRMQMMQSC:
    STRMQMMQSC SRCMBR(MQJMS_PSQ) SRCFILE(QGPL/QCLSRC)

For z/OS:

  1. Copy the script from the HFS into a PDS using a TSO command similar to:
    OGET '/usr/lpp/mqm/java/bin/MQJMS_PSQ.mqsc' 'USERID.MQSC(MQJMSPSQ)'
    The PDS should be of fixed-block format with a record length of 80.

  2. Either use the CSQUTIL application to execute this command script, or add the script to the CSQINP2 DD concatenation in your queue manager's started task JCL. In either case, refer to the WebSphere MQ for z/OS System Setup Guide and the WebSphere MQ for z/OS System Administration Guide for further details.

For the other platforms:

runmqsc MY.QUEUE.MANAGER < MQJMS_PSQ.mqsc

If an error occurs, check that you typed the queue manager name correctly and that the queue manager is running.


uj10650_