Sie sind auf Seite 1von 18

Introduction to z/OS Basics

Chapter 15: WebSphere MQ

2006 IBM Corporation

Chapter 15 WebSphere MQ

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

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

2006 IBM Corporation

Chapter 15 WebSphere MQ

Synchronous communication model


B
MQI
MQI

MQI

MQI

2006 IBM Corporation

Chapter 15 WebSphere MQ

Asynchronous communication model


B
MQI
MQI

MQI

MQI

A
C

2006 IBM Corporation

Chapter 15 WebSphere MQ

Styles of Communication
Conversational

Program
A

Program
B

Program
A

Call and
return

Program
Program
A

Messaging

Program
A

Program
B

Program
C

2006 IBM Corporation

Chapter 15 WebSphere MQ

Messages
Types of messages:
Datagram
Request
Reply
Report

2006 IBM Corporation

Chapter 15 WebSphere MQ

Queue Manager
Program
DB2

Data

Queue
manager

Messages

Program

Program

2006 IBM Corporation

Chapter 15 WebSphere MQ

Message Queue Interface (MQI)


Major calls

Application

MQCONN
MQCONNX
MQOPEN
MQCLOSE
MQPUT
MQPUT1
MQGET

MQI

Queue manager

Process
object

Namelist
object

Minor calls

Queue
manager
object

MQBEGIN
MQCMIT
MQBACK
MQINQ
MQSET

2006 IBM Corporation

Chapter 15 WebSphere MQ

Message layout
Message = Headers + Application data

Headers

Set by application and


queue manager
Headers
MQMD
MQXQH
MQDLH
and so forth

10

Application

Any sequence of bytes


Private to the sending and
receiving applications
Not meaningful to the
queue manager

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

DB

Synchronous
model

Write
Send

Receive
Write
2-phasa

Syncpoint

DB

Syncpoint

commit
Unit of work

DB

Unit of work 1

Asynchronous
model

Write

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

MQGET Reply-to-queue

15

Hotel

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

Das könnte Ihnen auch gefallen