Sie sind auf Seite 1von 4

MQ Series

This is a Middleware for messaging and queuing.

Messaging:
Programs communicate with each other by sending the data in
messages, not by
calling the program directly.

Queuing:
Programs communicate through Queue need not to run
concurrently.

This enables programs to communicate with each other across the


network regardless of operating system, protocols etc.,
MQ series uses a consistent API (Application Program Interface) across
all the platforms.

EX:
Appl pgm - A Appl pgm - B Appl pgm - C
MQ-Series MQ-Series MQ-Series
| | |
| | |
| | |
| | |
| | |
--------------------------------------------------
Network
--------------------------------------------------

Advantages of Messaging and Queuing:


- The programs can be written in various programming languages.

- It is not required that target application needs to be there when a


message is sent.

- The target application need not be in the run mode always. It can be
triggered when required (that is automatically started when a
message arrives or after a specified number of messages has
arrived)

- Messages can be assigned the priority.


There are 2 types of messages

Persistent Message:
Even when the system fails (Communication Fails) the messages
arrive at the destination.

Non Persistent Message:


The message is lost when the communication fails.

There are number of queues available.


Local Queue:
Owned by the Queue Manager to which the application program is
connected.

Remote Queue:
When the queue is owned by the different queue manager.

Transmission Queue:
Send messages to the queue which are owned by the different Queue
Managers.
From this Transmission queue the data is sent to the remote Queue
Manager.

Initiation Queue:
Local queue to which the queue manager writes a trigger message.

Queue managers :
- Manages Queues & Messages.

- Queue Managers are connected through Channels.(Channels –


Connecting the Queue Managers)

- Multiple Queue managers can reside in the same machine.

- Queue Manager takes care of the destination where the message


needs to be sent.

- Queue Managers to do the above process has its own unique


objects that are defined by the administrator.

- If needed it can segment the messages and assemble it again.


- Each applicaiton program has its own Queue Manager.
- A queue manager also provides the Message Queue Interface
(MQI) to enable an application to access its queues and the messages
they contain

Channels:
Queue Managers are connected by Message Channels Agents(MCA)
There are two MCA’s , a sender and a receiver.
The above is flow diagram which shows the flow of data from Program
1 to Program 2

- MQI collects the message (data) from program 1 and finds which
Remote Queue is required to pass the data to the destination.
- In the figure, the trigger monitor is a special program used just
to start channels. It is called the channel initiator. The process
used to start channels based on triggering is the same as
starting other applications
- Then the message is passed to the Transmission Queue (Xmit Q)
- As the channel Initiator has started the channel now the data is
ready to reach the destination.
- On the other side the Listener will be listening to incoming
messages.
- Once the data is arrived it starts the channel and retrieves the
data from Channel into the Local Q and hence passed into the
program.

Das könnte Ihnen auch gefallen