Вы находитесь на странице: 1из 6

Authors: Sai Krishna,Prasanth,Santosh

Table of Contents
1.Introduction.......................................................................................................................................3
2.Target Audience.................................................................................................................................3
3.Requirements.....................................................................................................................................3
Hardware Requirements:..................................................................................................................3
4.Overview...........................................................................................................................................4
5.Build it Yourself................................................................................................................................5
6.References.........................................................................................................................................6
1. Introduction
Publish⁄subscribe messaging allows you to decouple the provider of information, from the
consumers of that information. The sending application and receiving application do not need to
know anything about each other for the information to be sent and received.
Before a point-to-point WebSphere MQ application can send a message to another application, it
needs to know something about that application. For example, it needs to know the name of the
queue to which to send the information, and might also specify a queue manager name.
WebSphere MQ publish⁄subscribe removes the need for your application to know anything about
the target application. All the sending application has to do, is put a WebSphere MQ message,
containing the information that it wants, and assign it a topic, that denotes the subject of the
information, and let WebSphere MQ handle the distribution of that information. Similarly, the target
application does not have to know anything about the source of the information it receives.
Figure 1 shows the simplest publish/subscribe system. There is one publisher, one queue manager,
and one subscriber. A subscription is sent from the subscriber to the queue manager, a publication is
sent from the publisher to the queue manager, and the publication is then forwarded by the queue
manager to the subscriber.
Figure 1. Simple publish/subscribe configuration

A typical publish/subscribe system has more than one publisher and more than one subscriber, and
often, more than one queue manager. An application can be both a publisher and a subscriber.

2. Target Audience
System Administrators

3. Requirements

Hardware Requirements:
For Windows:
x86 and x86-64 (also known as x64) technology-compatible PC hardware, capable of running the
required level of a compatible operating system with enough storage to meet the combined
requirements of the programming prerequisites, WebSphere MQ, the access methods and the
application programs.
**Note that Itanium 64-bit is not supported.
Linux for System x (32-bit)x86 compatible PC hardware, including x86-64 processors, capable of
running the required level of a compatible operating system with enough storage to meet the
combined requirements of the programming prerequisites, WebSphere MQ, the access methods and
the application programs.
Linux for System x (64-bit)AMD64, EMT64, and compatible processors - any hardware that is
explicitly compatible and fully capable of running the specified operating system, all the
corresponding supporting software shown below, and any associated applications unmodified.

4. Overview

The Pub/Sub design pattern is based on a scenario where clients (publishers) “publish” messages to
topics. Then one or more clients (subscribers) that are interested in that topic can “subscribe” to that
topic. Publishers and Subscribers are loosely coupled and are not aware of each other. This is
different than the point-to-point implementation where sender and receivers are tightly coupled at
minimum from a connectivity standpoint.

Following is a very high-level illustration of Pub/Sub:


Components of publish/subscribe
Publisher - 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 -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).

Publications Router - This component passes messages from publishers to topic


subscribers. Generally this is a Queue Manager.

Topic - A topic is a character string that describes the subject of the information that is
published in a publish/subscribe message.

5. Build it yourself

i) Creating and starting the queue manager A


ii) Defining a local queue, topic and a subscriber

iii) Publishing the message

iv) Notice that in all the subscribers windows the output should reveal that the
subscribers to the topic were able to receive the message, even when the publisher was in a
remote queue manager
6. References

http://transformatech.wordpress.com/2013/09/13/simple-pubsub-example-using-websphere-
message-broker-v7-mq-v-7/

http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=
%2Fcom.ibm.mq.amqnar.doc%2Fps20010_.htm

http://mqpubsub.blogspot.in/

Вам также может понравиться