Internet and Intranet Protocols and Applications. Lecture 14 Introduction to MQSeries And Asynchronous Messaging May 1, 2002 Joseph Conron Computer Science Department New York University firstname.lastname@example.org. What is MQSeries?.
Introduction to MQSeries
And Asynchronous Messaging
May 1, 2002
Computer Science Department
New York University
Outcome is known immediately
Error recovery easier (usually)
Better real-time response (usually)
Service must be up and ready
requestor blocks, held resources are “tied up”
Usually requires connection-oriented protocolSynchronous: good/bad
We are free to concentrate on the design of the application itself.
We are no longer concerned with details of the environment.
Our application is suddenly portable and to some degree, extensible.
“State Street Bank would like to announce the wedding of
IBM and Systems Strategies!”
Programs communicate by putting messages on queues. Here, program A puts a message on Queue1, which is read by program B.
Note: A and B need not be on the same machine!
Communication can be one-way or two-way. Here, A sends to B on Queue1, and B responds to A on Queue2
1) Communicating programs can run at different times.
2) There are no constraints on application structure.
3) Programs are insulated from environmental differences.
Either program can be unavailable
Key Concept:message queue exists independently from programs that use them!
There can be a one to many relationship between applications
Or a many to one relationship between applications
Communications using Message Channels
(1) Application puts message on transmission queue
(4) Message is available on local queue for applications
(2) Sender MCA gets message and sends to partner MCA
(3) Receiver MCA puts message on target queue
Unit of recovery -a piece of work that changes data from one point of consistency to another.
Syncpoint - A point of consistency (also called a or commit point). It is a moment at which all the recoverable data that an application program accesses is consistent.
Some examples: Sybase, DB2, Oracle.
MQCONN Connect to queue manager
MQDISC Disconnect from queue manager
MQOPEN Open queue
MQCLOSE Close queue
MQPUT Put message
MQGET Get message
MQPUT1 Put one message (implied open/put/close)
MQBEGIN Begin unit of work
MQBACK Back out
MQINQ Inquire about queue attributes
MQSET Set queue attributes