Adding a stream
You can add streams manually to allow for data isolation between applications, or to allow inter-operation with Version 6 publish/subscribe hierarchies.
Before you begin
Familiarize yourself with the way publish/subscribe streams operate. See Streams and topics.
About this task
Procedure
- Define a local queue with the same name as the Version 6 stream.
- Define a local topic with the same name as the Version 6 stream.
-
Add the name of the queue to the namelist,
SYSTEM.QPUBSUB.QUEUE.NAMELIST
- Repeat for all queue managers at Version 7.1 or above that are in the publish/subscribe hierarchy.
Adding 'Sport'
In the example of sharing the stream 'Sport'
, Version 6 and Version 7.1 queue managers are working in the same publish/subscribe hierarchy. The Version 6 queue managers share a stream called 'Sport'
. The example shows how to create a queue and a topic on Version 7.1 queue managers called 'Sport'
, with a topic string 'Sport'
that is shared with the Version 6 stream 'Sport'
.
A Version 7.1 publish application, publishing to topic 'Sport'
, with topic string 'Soccer/Results'
, creates the resultant topic string 'Sport/Soccer/Results'
. On Version 7.1 queue managers, subscribers to topic 'Sport'
, with topic string 'Soccer/Results'
receive the publication.
On Version 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.
What to do next
If a broker is Version 6, administer it as a Version 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 Version 7.1, you must configure each Version 7.1 queue manager in the hierarchy manually.