Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

18
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ
  • date post

    15-Jan-2016
  • Category

    Documents

  • view

    231
  • download

    1

Transcript of Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

Page 1: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

Introduction to z/OS Basics

© 2006 IBM Corporation

Chapter 15: WebSphere MQ

Page 2: 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

Page 3: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 4: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

Chapter 15 WebSphere MQ

© 2006 IBM Corporation4

Synchronous communication model

BB

AA

MQI

MQI

MQI

MQI

Page 5: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

Chapter 15 WebSphere MQ

© 2006 IBM Corporation5

Asynchronous communication model

BB

CC

AA

MQI

MQI

MQI

MQI

Page 6: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

Chapter 15 WebSphere MQ

© 2006 IBM Corporation6

Styles of Communication

ProgramA

ProgramB

ProgramC

ProgramA

Conversational

Messaging

Call and return

ProgramA

ProgramB

ProgramA

ProgramA

Page 7: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

Chapter 15 WebSphere MQ

© 2006 IBM Corporation7

Messages

Types of messages:

– Datagram

– Request

– Reply

– Report

Page 8: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

Chapter 15 WebSphere MQ

© 2006 IBM Corporation8

Queue Manager

Messages

Program

Data

Program

Program

Queuemanager

DB2

Page 9: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 10: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 11: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 12: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 13: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

Chapter 15 WebSphere MQ

© 2006 IBM Corporation13

Security

Local Queue Manager

Remote Queue Manager

MCAMCA

MCAMCA

MQMDApplication

Data

USERID

Context

Database

Page 14: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 15: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 16: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 17: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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

Page 18: Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ.

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).