WebSphere MQ

advertisement
Introduction to z/OS Basics
Chapter 15: WebSphere MQ
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Chapter objectives
 Be able to:
2

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
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Key terms in this chapter
 local queue
 dead-letter queue
 channel
 QM
 message-driven
 remote queue
 MQI
 syncpoint
 asynchronous application
3
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Synchronous communication model
B
MQI
MQI
1
eue
Qu
2
eue
Qu
MQI
MQI
A
4
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Asynchronous communication model
B
MQI
MQI
1
eue
Qu
2
eue
Qu
MQI
MQI
A
C
5
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Styles of Communication
Conversational
Program
A
Program
B
Program
A
Call and
return
Program
Program
A
A
Messaging
Program
A
Program
B
Program
C
6
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Messages
 Types of messages:
– Datagram
– Request
– Reply
– Report
7
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Queue Manager
Program
DB2
Data
Queue
manager
Messages
Program
Program
8
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Message Queue Interface (MQI)
9
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Message layout
10
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Queue types
System 1
Program A
MQPUT Q2
System 2
Program C
Program B
MQPUT Q1
MQGET Q1
MQGET Q2
MQI
Queue
manager
Queue
manager
QX
Q1
Q2
DLQ
Network - MCA
11
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Channels
Program 1
Program 2
get
put
get
MQI
Local Q2
Channel
QMB.QMA
Receiver
MQI
Local Q1
Remote Q1
QMA
put
Remote Q2
QMB
XmitQ
QMB
Channel
QMA.QMB
Sender
Channel
QMB.QMB
Receiver
XmitQ
QMA
Channel
QMB.QMA
Sender
Network
12
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Security
Local Queue Manager
MCA
MCA
MQMD
USERID
Application
Data
Remote Queue Manager
Database
Context
13
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Data Integrity
Synchronous
model
DB
Write
Send
Receive
Write
2-phasa
Syncpoint
DB
Syncpoint
commit
Unit of work
DB
Asynchronous
model
Write
q
Unit of work 1
Put
Syncpoint
Get
q
Unit of work 2
Write
Syncpoint
DB
Unit of work 3
14
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Travel agency example revisited
Car
MQPUT
MQPUT CAR RENTAL
MQPUT FLIGHT
Car rental
MQPUT HOTEL
Flight
MQPUT
Reply-to
queue
Flight
Hotel
MQPUT
Hotel
MQGET Reply-to-queue
15
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
Interfacing to WebSphere MQ
 MQ is available on many platforms
 On z/OS it has interfacing to:
– CICS
– IMS
– Batch or TSO
16
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
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
17
© 2006 IBM Corporation
Chapter 15 WebSphere MQ
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).
18
© 2006 IBM Corporation
Download