23 October, 2018
Publish/Subscribe Messaging Overview
Publish/subscribe is the messaging oriented equivalent of the object-oriented observer design pattern. In publish/subscribe messaging, a sender application creates a message containing the information it wants to send and assigns it a topic that denotes the subject of the information. This message is called a publication. WMQ receives the publication, recognizes the topic, and then distributes the publication to interested applications.
Publisher (information producer)
In this component generates messages (publications) under a certain subject (topic) and sends the publications to a WMQ queue manager. A publisher knows nothing about the recipient(s) of the information.
Subscriber (information consumer/receiver)
In this component registers interest in a certain topic(s) with a WMQ queue manager. It also specifies its subscription queue name; that is, the queue where it wants to receive the messages related to this topic. The subscriber knows nothing about the information publishers(s). A publications router: In this component passes messages from publishers to topic subscribers. Earlier WMQ versions required a broker component on top of a queue manager to enable publish/subscribe. The broker maintained topics and subscriptions, and it routed publications. The queue manager is now responsible for topics, subscriptions, and routing publications.
Publish/subscribe access controls
A publish/subscribe system can have many publishers and many subscribers, and often, two or more queue managers communicating with one another. Also, an application can be both a publisher and a subscriber.
Publish/Subscribe using MQ Explorer
1.Create a Queue Manager: 2.Create the Queue manager name as 'QM'. 3.Create a pub sub topic called 'NEWS' with topic string: NEWS, using WebSphere MQ Explorer.
Create a New Topic
1.Right-click on Topics and then select New –> Topic to start the "News" wizard. 2. Type “News” as the topic name. This represents the WMQ administrative object used to manage the topic.
3. Click Next. 4. On the topic properties page, type “News” in the Topic string field. This string is used to refer News topic. 5. Click on Finish. 6. Follow the below steps to create some more “Topics name” and “Topic Strings”.
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills .