Академический Документы
Профессиональный Документы
Культура Документы
What is MQSeries
MQSeries Terminology
MQSeries Facilities
MQSeries Features and Functionality
What is MQSeries
MQSeries is an component used to tie together different software applications so
that they can work together. This type of application is often known as business integration software
IBMs middleware for commercial messaging and queuing. Available in 35 different platforms. Enable programs to communicate with each other across a network of unlike
components, such as processors, subsystems, operating systems and communication protocols. MQSeries programs use a consistent application program interface (API) across all platforms.
MQSeries Platforms
MQSeries supports 35 different platforms. Few of the platforms supported by
Lotus Notes AS/400 AT&T GIS UNIX Digital Open VMS HP-UX MVS/ESA SINIX or DC/OSx SUNOS OS/2 Warp Sun Solaris Windows Tandem NSK Windows NT AIX
Message Routing
1r A .o p P rm g u a t s an m1 s Q g o t o
1 Q
A
4r A .o g P rm g e a t s tr m h s e g e p l y f Q r 2 o m
2rB .o P rm g a g m e s te s g t h f Q r 1 o m
2 Q
3r B .o p P rm g u at s am r s eg p l y o n t2 o Q
MQSeries - Basics
Links "nearly everything to almost anything..." Loosely-coupled flexibility via queuing
Time Independence
e u e u Q 1 A e u e u Q 2
A Unit of Information A Request for Service A Reply or Report An Announcement or Broadcast Audio or Video
A Queue is:
A Safe Place to hold Messages A Message can be protected: Across the network or System failures
A queue can be: - Predefined - Created dynamically by an application More than one application can access a queue
- Persistent - Non Persistent Access to messages - FIFO - Priority - Direct 100 Mb maximum message length (V5) A large message can be segmented into a number of smaller ones
MQ Messages
MH U e=rst s e e s a r a d D g e a e + a
Header: A series of message
H e a d e r
U sa e r D a t
attributes understood and augmented by the Queue Manager, such as: target queue name, length of user data, message priority, reply-to queue name....etc.
User Data: Any sequence of bytes Private to the sending and receiving programs Not meaningful to the Queue Manager
MQ Message types
Message type Request/Reply An application places a message on a queue and expects a reply in return. This
does not necessarily imply synchronous operation, as the process receiving the reply may be separate from the requester. Datagram (Fire&Forget) A datagram message is a message placed on a queue, for which no reply is expected.
Report A report is a message generated by the queue manager if requested by the application on completion of an event.
MQSeries Objects
Queue Manager
The queue manager is an interface to messages and queues. For an application to use MQ, it must first connect to a queue manager. It is possible to run more than one queue manager on the same machine, although
MQSeries Objects
Queues Queue is a data structure used to store messages.
It is the most frequently used object type and it is owned by the queue manager. Queues can be defined as local or remote, An application may create a queue dynamically.
MQSeries Objects
Types of Queues:
Local queues Remote queues Transmission Queue Model Queue Dynamic Queue Event Queue Initiation Queue Dead Letter Queue
MQSeries Objects
Channel A channel is defined between two queue managers. Channels are uni-directional. It may be the case that a remote queue exists on a queue manager that is more than one hop away.
Me Q S e r i s If na t c ee r
M ee s s a g Q ug e u i n Se e r v i c M ee s s a g Q ug e u i n Se e r v i c
Me Q S e r i s If na t c ee r
Q 1
M ee s s a g Ce hl a n n A g e n t
Q 2
M ee s s a g Ce hl a n n A g e n t
X M I T Q
Nk er t w o
M Q e ee s s u a g u e Mr a n a g e
M Q e ee s s u a g u e Mr a n a g e
Typical Workflow
MQSeries Trigger
MQSeries triggering enables a program to be started automatically when
messages arrive on a queue. You can set trigger conditions on a queue so that a program is started to process that queue: When the first message arrives on the queue When the number of messages on the queue reaches a predefined number Every time a message arrives on the queue
MQ-Series Trigger
MQSeries Features
Single multiplatform API Assured message delivery Indirect program to program communications Time Independence Programs communicate by sending data in messages, and not by calling directly. Indirect communication Programs communicate thru Queues
MQI Calls
MQI is IBM's message queuing API. Originally published as part of IBM's Open
MQCONN - connects an application to a particular queue manager. MQOPEN - opens an MQSeries object, such as a queue, and returns a handle for
MQGET - attempts to retrieve messages from a local queue opened earlier for input. MQPUT - writes messages onto local or remote queues that have previously been
options specified, can cause an object such as a dynamic queue and its contents to be destroyed. MQDISC - breaks the connection previously established with a particular MQSeries queue manager. MQINQ - selectively inquires about a variety of MQSeries object attributes. MQSET - allows certain MQSeries object attributes to be set or modified from an application. MQCMIT - indicates to the queue manager that the application has reached a sync point and that all gets and puts since the last sync point are to be made permanent. MQBACK - indicates to the queue manager that it should roll-back all gets and puts that have occurred since the last sync point.
END-CALL.
MQCONN
MQOPEN
MQCLOSE
MQDISC
MQPUT
MQGET
MQPUT1
MQINQ
MQSET
Return Codes
A completion code and a reason code are returned as output parameters by
success and failure, respectively. Some calls can return an intermediate state, MQCC_WARNING, indicating partial success.
There are many reason codes, covering circumstances as a queue being full,
get operations not allowed, and a queue not being defined. ( MQRC_NONE, MQRC_NOT_AUTHORIZED, MARC_Q_MGR_NOT_AVAILABLE)
MQRC_NONE.
Message Persistence
Message Priority
Message Expiry
The Steps are Composes a document in the Lotus Notes user database. Activates a macro that includes the @MailSend function. This creates a new mail memo, based on the information supplied in the arguments list, in the add-in tasks Mail-In database. The add-in task periodically checks its own Mail-In Database, and removes the mail memo as soon as it is ready to process it. The add-in task, using the name of the link database entry in the mail memo, refers to the information held in the link database to determine what action is required and what queues are to be used. The add-in task then constructs an MQSeries message from the mail memo and places it on the queue named in the link database entry.
control information, on its own work queue (it uses this information to process the reply). and places a reply on the reply queue..
The MQSeries application removes the message from the queue and processes it The add-in task, after checking its Mail-In database, also checks those queues on
which it is expecting reply messages (the names of which are held in the work queue).
The control information stored earlier on the work queue is removed and used.
The reply message data is used to update the original document on the Lotus