WebSphere MQ Publish/Subscribe uses streams primarily as a way of partitioning the topic name space. Sets of related topics can be grouped together into separate streams, allowing different security controls to be applied to different streams, and the publishing work load of the broker to be better balanced.
However, WebSphere Message Broker provides more flexible controls to achieve both of these behaviors. Therefore, the concept of a stream is supported only for MQRFH application compatibility.
The security controls of WebSphere Message Broker allow authorization to be applied to an individual topic level. Also, the publishing workload of the broker can be more easily controlled by creating additional instances of publication message flows that can serve either the same or different input queues.
WebSphere Message Broker still allows MQRFH client applications to specify an MQPSStreamName command parameter in their subscriptions and publications. However, the stream name is only used to modify the topic to preserve the partitioning characteristic of WebSphere MQ Publish/Subscribe.
When the stream name associated with a message is set to something other than SYSTEM.BROKER.DEFAULT.STREAM, the message is processed as if the topic, or topics, mentioned within the message had been prefixed with the string "$SYS/STREAM/<streamname>/". That is, a subscription to Topic1 that specifies a stream name of StreamX is processed as if the subscription had been made to topic "$SYS/STREAM/StreamX/Topic1".
MQRFH2 publishing and subscribing applications can still target stream-related topics, even though they themselves are not allowed to specify a stream name in the messages that they send to the WebSphere Message Broker broker. To do this, they must prefix the topics with the appropriate stream prefix.
For example, to subscribe to topic "IBM/Latest" that is published on stream STOCK.STREAM within the WebSphere MQ Publish/Subscribe network, an MQRFH2 subscriber must specify topic "$SYS/STREAM/STOCK.STREAM/IBM/Latest".
WebSphere MQ Publish/Subscribe allows a stream-related publication to be sent only to a queue that has the same name as the stream. However, WebSphere Message Broker allows publishing clients to send their publications to any input queue in a message flow.
MQRFH applications that explicitly specify a stream name parameter within a publication can send it to any publication queue that is serviced by the WebSphere Message Broker broker. The queue does not need to have the same name as the stream.
Be aware that the order in which publications are received might be different from what you might expect.
Each Publication node has an Implicit Stream Naming property whose default value is true. This default option results in behavior that is identical to that in WebSphere MQ Publish/Subscribe when an MQRFH publication does not contain an explicit stream name. If this property is false, and the publication does not contain an explicit stream name, SYSTEM.BROKER.DEFAULT.STREAM is assumed.
The next table summarizes the options that are available to both MQRFH and MQRFH2 client applications that publish messages, either to the default stream or to a specific WebSphere MQ Publish/Subscribe stream. The stream name StreamX is used to illustrate the options.
MQRFH publisher | MQRFH2 publisher | |||
---|---|---|---|---|
default stream | StreamX | default stream | StreamX | |
MQRFH subscriber | S1,P1 | S2,P2 | S1,P3 | S2,P4 |
MQRFH2 subscriber | S3,P1 | S4,P2 | S3,P3 | S4,P4 |
Subscriber notes:
|
||||
Publisher notes:
|
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
aq19790_ |