About Me
Facebook
Facebook
Linked In
Linked In
Twitter
Twitter
YouTube
YouTube
Google +
Google +

June 26, 2015

MQ Basics



What is MQSeries?
A middleware product that implements a messaging and queuing framework.
Middleware - an intermediate software component that bridges dissimilar computing environments.
Messaging - programs communicate by sending data in messages rather than by calling each other directly.
Queuing - messages are put on queues in storage, eliminating the need for programs to be logically connected.
A messaging and queuing framework is inherently ASYNCHRONOUS!
MQSeries Objects
Queue Manager
A queue manager is that part of an MQSeries product that provides the messaging and queuing services to application programs, through the Message Queue Interface (MQI) program calls. It controls access to queues and serves as transaction (syncpoint) coordinator for all queue operations.
Queue manager names must be unique!
Queues
MQSeries defines four types of queues. A queue instance is fully qualified by its queue manager and queue name.
Local Queue - an actual queue for which storage is allocated.
Remote Queue - a definition of a queue on a different queue manager (acts somewhat like a pointer)
Alias Queue - another name for a local or remote queue. Typically used to switch queue destinations without modifying program code
Model Queue - a template whose properties are copied when creating a new dynamic local queue (“ create queue *** “like” queue yyy).
Some properties of local queues:
·         Maximum Message Size
·         Maximum Queue Depth
·         High/Low Factors
·         Enable/Disable Put or Get
·         Persistent/Not Persistent
Local queues can generate events (messages) under certain conditions (like queue full).
These “event” messages can be used to “trigger” the execution of a program.
These events are called trigger messages. The queue on which they are put is called an Initiation Queue.
Process
Process defines an application to an MQSeries queue manager. A process definition object is used for defining applications to be started by a trigger monitor.
A trigger monitor is a program that listens on an initiation queue and executes commands named in Process definitions.
Triggers and Process definitions are useful when you don’t want to deploy long-running programs. Suppose the message rate is very low (several minutes between requests). Perhaps it is better to instantiate the program for each message, and then let it exit.
Channels
A channel provides a communication path between Queue Managers. There are two types of channels - Message Channels and MQI channels (also called Client channels).
Message channels - provide a communication path between two queue managers on the same, or different, platforms.
A message channel can transmit messages in one direction only. If two-way communication is required between two queue managers, two message channels are required.
There are six types of message channels:
1. Sender - initiates connection to Receiver
2. Server - Accepts request to start from requester, then becomes Sender
3. Receiver - Passive; waits for initiation sequence form Sender
4. Requester - Active at start, then becomes Receiver
5. Cluster-sender (used amongst Cluster Queue Managers)
6. Cluster-receiver (ditto)
The Sender side of the session is the “transaction coordinator”.
Message channels implement a protocol that includes a commitment protocol.
Channels recover from failure by agreement: they must agree on the last committed unit of work [would this be harder if channels were bi-directional??]
MQI channels - connect an MQSeries client to a queue manager on a server machine (where a queue manager is defined). Used for transfer of MQI calls and responses only and is bi-directional.

0 comments :

Post a Comment

Designed By AMEER BASHA G