View
229
Download
1
Embed Size (px)
Citation preview
Introduction to z/OS Basics
© 2006 IBM Corporation
Chapter 15: WebSphere MQ
Chapter 15 WebSphere MQ
© 2006 IBM Corporation2
Chapter objectives
Be able to:
Explain why messaging and queuing is used
Describe the asynchronous flow of messages
Explain the function of a queue manager
List three zSeries-related adapters
Chapter 15 WebSphere MQ
© 2006 IBM Corporation3
Key terms in this chapter
local queue
channel
message-driven
MQI
asynchronous application
dead-letter queue
QM
remote queue
syncpoint
Chapter 15 WebSphere MQ
© 2006 IBM Corporation4
Synchronous communication model
BB
AA
MQI
MQI
MQI
MQI
Chapter 15 WebSphere MQ
© 2006 IBM Corporation5
Asynchronous communication model
BB
CC
AA
MQI
MQI
MQI
MQI
Chapter 15 WebSphere MQ
© 2006 IBM Corporation6
Styles of Communication
ProgramA
ProgramB
ProgramC
ProgramA
Conversational
Messaging
Call and return
ProgramA
ProgramB
ProgramA
ProgramA
Chapter 15 WebSphere MQ
© 2006 IBM Corporation7
Messages
Types of messages:
– Datagram
– Request
– Reply
– Report
Chapter 15 WebSphere MQ
© 2006 IBM Corporation8
Queue Manager
Messages
Program
Data
Program
Program
Queuemanager
DB2
Chapter 15 WebSphere MQ
© 2006 IBM Corporation9
Message Queue Interface (MQI)
Application
Queue manager
MQI
Queue manager
object
Namelist object
Process object
Major callsMQCONNMQCONNXMQOPENMQCLOSEMQPUTMQPUT1MQGET
Minor callsMQBEGINMQCMITMQBACKMQINQMQSET
Chapter 15 WebSphere MQ
© 2006 IBM Corporation10
Message layout
Set by application and queue managerHeaders
MQMDMQXQHMQDLHand so forth
Any sequence of bytesPrivate to the sending and receiving applicationsNot meaningful to the queue manager
Message = Headers + Application data
ApplicationHeaders
Chapter 15 WebSphere MQ
© 2006 IBM Corporation11
Queue types
Program A Program B Program C
System 1 System 2
MQPUT Q2 MQPUT Q1 MQGET Q1 MQGET Q2
Queuemanager
Queuemanager
MQI
QX Q1 Q2DLQ
Network - MCA
Chapter 15 WebSphere MQ
© 2006 IBM Corporation12
Channels
MQI
Program 1
putget
QMA
Local Q2
ChannelQMB.QMAReceiver
Remote Q1
XmitQQMB
ChannelQMA.QMBSender
MQI
Program 2
putget
QMB
Local Q1
ChannelQMB.QMBReceiver
Remote Q2
XmitQQMA
ChannelQMB.QMASender
Network
Chapter 15 WebSphere MQ
© 2006 IBM Corporation13
Security
Local Queue Manager
Remote Queue Manager
MCAMCA
MCAMCA
MQMDApplication
Data
USERID
Context
Database
Chapter 15 WebSphere MQ
© 2006 IBM Corporation14
Data Integrity
DBDBWriteSend
Syncpoint
ReceiveWrite DBDB
Syncpoint2-phasa
commit
Synchronousmodel
Unit of work
DBDB Write
PutSyncpointUnit of work 1
Unit of work 2
Unit of work 3
qq Get
WriteSyncpoint
DBDB
Asynchronousmodel
Chapter 15 WebSphere MQ
© 2006 IBM Corporation15
Travel agency example revisited
MQPUT CAR RENTAL
MQPUT FLIGHT
MQPUT HOTEL
MQGET Reply-to-queue
Car rental
Flight
Hotel
Car
Flight
Hotel
MQPUT
MQPUT
MQPUT
Reply-to queue
Chapter 15 WebSphere MQ
© 2006 IBM Corporation16
Interfacing to WebSphere MQ
MQ is available on many platforms
On z/OS it has interfacing to:
– CICS
– IMS
– Batch or TSO
Chapter 15 WebSphere MQ
© 2006 IBM Corporation17
MQ functions
Common application programming interface (MQI)
Assured delivery: messages do not get lost and they arrive only once
No synchronous access needed
Message driven application
Quicker development due to shielding of the network
Chapter 15 WebSphere MQ
© 2006 IBM Corporation18
Summary
Messaging and queuing enables communication between applications on different platforms.
WebSphere MQ is an example of software that manages messaging and queuing in the mainframe and other environments.
With messaging, programs communicate by through messages, rather than by calling each other directly.
With queuing, messages are retained on queues in storage, so that programs can run independently of each other (asynchronously).