Adding a stream

You can add streams manually to allow for data isolation between applications, or to allow inter-operation with IBM® WebSphere® MQ 6 publish/subscribe hierarchies.

Before you begin

Familiarize yourself with the way publish/subscribe streams operate. See Streams and topics.

About this task

Use PCF command, runmqsc, or IBM MQ Explorer to do these steps.
Note: You can perform steps 1 and 2 in any order. Only perform step 3 after steps 1 and 2 have both been completed.

Procedure

  1. Define a local queue with the same name as the IBM WebSphere MQ 6 stream.
  2. Define a local topic with the same name as the IBM WebSphere MQ 6 stream.
  3. Add the name of the queue to the namelist, SYSTEM.QPUBSUB.QUEUE.NAMELIST
  4. Repeat for all queue managers at IBM WebSphere MQ 7.1 or above that are in the publish/subscribe hierarchy.

Adding 'Sport'

In the example of sharing the stream 'Sport', IBM WebSphere MQ 6.0 and IBM WebSphere MQ 7.1 queue managers are working in the same publish/subscribe hierarchy. The IBM WebSphere MQ 6 queue managers share a stream called 'Sport'. The example shows how to create a queue and a topic on IBM WebSphere MQ 7.1 queue managers called 'Sport', with a topic string 'Sport' that is shared with the IBM WebSphere MQ 6 stream 'Sport'.

An IBM WebSphere MQ 7.1 publish application, publishing to topic 'Sport', with topic string 'Soccer/Results', creates the resultant topic string 'Sport/Soccer/Results'. On IBM WebSphere MQ 7.1 queue managers, subscribers to topic 'Sport', with topic string 'Soccer/Results' receive the publication.

On IBM WebSphere MQ 6 queue managers, subscribers to stream 'Sport', with topic string 'Soccer/Results' receive the publication.


runmqsc QM1
5724-H72 (C) Copyright IBM Corp. 1994, 2024.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager QM1.
define qlocal('Sport')
     1 : define qlocal('Sport')
AMQ8006: IBM MQ queue created.
define topic('Sport') topicstr('Sport')
     2 : define topic('Sport') topicstr('Sport')
AMQ8690: IBM MQ topic created.
alter namelist(SYSTEM.QPUBSUB.QUEUE.NAMELIST) NAMES('Sport', 'SYSTEM.BROKER.DEFAULT.STREAM', 'SYSTEM.BROKER.ADMIN.STREAM')
     3 : alter namelist(SYSTEM.QPUBSUB.QUEUE.NAMELIST) NAMES('Sport', 'SYSTEM.BROKER.DEFAULT.STREAM', 'SYSTEM.BROKER.ADMIN.STREAM')
AMQ8551: IBM MQ namelist changed.
Note: You need both to provide the existing names in the namelist object, as well as the new names that you are adding, to the alter namelist command.

What to do next

Information about the stream is passed to other brokers in the hierarchy.

If a broker is IBM WebSphere MQ 6, administer it as an IBM WebSphere MQ 6 broker. That is, you have a choice of creating the stream queue manually, or letting the broker create the stream queue dynamically when it is needed. The queue is based on the model queue definition, SYSTEM.BROKER.MODEL.STREAM.

If a broker is IBM WebSphere MQ 7.1, you must configure each IBM WebSphere MQ 7.1 queue manager in the hierarchy manually.