Adding a stream
You can add streams manually to allow for data isolation between applications, or to allow inter-operation with IBM® MQ 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 stream on the earlier version of IBM MQ.
- Define a local topic with the same name as the stream on ht earlier version of IBM MQ.
-
Add the name of the queue to the namelist,
SYSTEM.QPUBSUB.QUEUE.NAMELIST - Repeat for all queue managers at the later version of IBM MQ that are in the publish/subscribe hierarchy.
Adding 'Sport'
In the example of sharing the stream 'Sport', the earlier version queue managers
and the later version IBM MQ queue managers are working
in the same publish/subscribe hierarchy. The earlier version queue managers share a stream called
'Sport'. The example shows how to create a queue and a topic on later version queue
managers called 'Sport', with a topic string 'Sport' that is
shared with the earlier version queue managers stream 'Sport'.
A later version queue manager publish application, publishing to topic 'Sport',
with topic string 'Soccer/Results', creates the resultant topic string
'Sport/Soccer/Results'. On the later version queue managers, subscribers to topic
'Sport', with topic string 'Soccer/Results' receive the
publication.
On earlier version queue managers, subscribers to stream 'Sport', with topic
string 'Soccer/Results' receive the publication.
runmqsc QM1
5724-H72 (C) Copyright IBM Corp. 1994, 2025. 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
You must configure each IBM MQ queue manager in the hierarchy manually.