Establishing the pub/sub environment IBM-CICS

The Change Of Address application is fundamentally a pub/sub application. As address changes are made in the postal service database via option 3 - “Add/Update Address”, notifications have to be made to all the interested parties. To achieve this end, we use WebSphere Message Broker’s pub/sub capabilities.

We want to mention the existence of the WebSphere MQ Publish/Subscribe facilities supplied as part of WebSphere MQ 5.3 fixpack 8 and above. We could certainly have used this facility as a pub/sub engine; however, WebSphere MQ Publish/Subscribe does not run on WMQ for z/OS. But apart from this, there is no technical reason we could not use the WebSphere MQ Publish/Subscribe broker by using another platform as the pub/sub engine.

It is straightforward to set up the pub/sub environment using the WMB Toolkit.

  1. First, assuming your broker is up and running and the toolkit is connected, make sure the Broker Administration perspective is showing. (Windows → Open Perspective → Broker Administration perspective).
  2. We created a single broker called AJGBRK1 on Windows.
  3. Next we create a topic called CICSWSAP/AddressChange that identifies our hash notification source. We open the pub/sub Topics window for this broker by double-clicking the Topics in the Domain pane at the bottom left. The toolkit now displays the topics for our broker.
  4. Create Topic

    Establishing the pub/sub environment

  5. In the Create Topic dialogue, we enter our topic name: CICSWSAP/AddressChange, and press Next.
    The Principle Definition window now displays.
  6. Since we are not too concerned about who has access to this information (address hash publications are not decodable) we select the Public Group group from the left pane and move it across to the right pane by pressing the “>” button.
  7. Create New Topic - Principle Definition

    Create New Topic - Principle Definition

  8. Press Finish.
  9. Next, we need to add a subscription into the subscription table for every client needing to be notified of the change of address. For our simple examples this is just a handful, but in reality this could be hundreds of clients. To add a subscription, WMB requires that we send a special format subscription message to a dedicated broker queue called SYSTEM.BROKER.CONTROL.QUEUE. The format of this message is described in the WMB Infocenter as follows:

    The Register Subscriber command message is sent to a broker by a subscriber, or by another application on behalf of a subscriber, to indicate that it wants to subscribe to one or more topics at a subscription point. A message content filter can also be specified.

    The Register Subscriber command message is an XML format message. For convenience and clarity, we use the PubSub support in the IH03 SupportPac™ - RFHUtil to create this message for us. (See the WMB Support site for a link to the supportPacs.)

    1. Open RFHUtil, and click the PubSub tab.
    2. RFHUtil can construct the necessary XML command message and place the message on the broker control queue for us, but we need to supply some details about our subscription:

      • Request type: Subscription
      • Topic: CICSWSAP/AddressChange
      • Filter:
      • Subscription Point/Stream: AddressChange
      • Subscription Name: AddressChange
      • Subscription Identity: Retrieve Address MsgFlow Example
      • Subscription Queue Manager: AJGBRK1
      • Subscription Queue: CICSWSAP.ADDRESS.CHANGE
      • Options: Join Shared, Add Name
      • Persistence: Persistent

      The RFHUtil window looks similar to Figure.

      Register a subscription with RFHUtil

      Register a subscription with RFHUtil

    3. We can verify that the subscription was accepted by querying the broker’s subscriptions in the toolkit.
    4. Return to the broker toolkit. If not already displayed, switch to the Broker Administration perspective. Double-click the Subscriptions item in the Domains pane at the lower left side. This opens the broker’s subscriptions.
    5. By default, no filtering criteria are enforced. Click the Query button (circled in Figure) to retrieve the registered subscriptions.

    Query Subscriptions in the broker toolkit

    Query Subscriptions in the broker toolkit

    It is a now simple matter of adding new subscriptions as required using the RFHUtil. Now, we create a simple WMB message flow to perform the message publication. The UpdateAddress application in CICS writes a message to a WMQ queue called CICSWSAP.PUBLICATION.QUEUE. Our simple publication message flow needs to take this message and publish it in our topic. Next, we deal with creating this message flow in WMB.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-CICS Topics