Download presentation
Presentation is loading. Please wait.
Published byAshley Barnaby West Modified over 9 years ago
1
Click to add text Introduction to z/OS Basics © 2006 IBM Corporation Chapter 15: WebSphere MQ
2
Chapter 15 WebSphere MQ © 2006 IBM Corporation 2 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
3
Chapter 15 WebSphere MQ © 2006 IBM Corporation 3 Key terms in this chapter local queue channel message-driven MQI asynchronous application dead-letter queue QM remote queue syncpoint
4
Chapter 15 WebSphere MQ © 2006 IBM Corporation 4 What is MQ? Most large organizations today have IT systems from various manufacturers.... makes it difficult to share communications and data across systems. These organizations need to communicate and share data with suppliers and customers, who might also have disparate systems. Handy to have a messaging tool that could receive data from one type of system and send that data to another type. WebSphere MQ facilitates application integration by passing messages between applications and web services. It is used on more than 35 platforms.. In the largest installation, billions of messages a day are transmitted.
5
Chapter 15 WebSphere MQ © 2006 IBM Corporation 5 What is MQ? Message queues, and the software that manages them enable program-to-program communication. Messaging and Queuing an be understood as follows: Messaging means that programs communicate by sending each other messages (data) rather than by calling each other. Queuing means messages are placed on queues in storage, Programs can run independently of each other, at different speeds and times,in different locations, and without having a logical connection between them.
6
Chapter 15 WebSphere MQ © 2006 IBM Corporation 6 Synchronous communication model
7
Chapter 15 WebSphere MQ © 2006 IBM Corporation 7 Synchronous Communication Program A prepares a message and puts it on Queue 1. Program B gets the message from Queue 1 and processes it. Both Program A and Program B use an application programming interface (API) to put messages on a queue and get messages from a queue. The MQ API is called the Message Queue Interface (MQI). When Program A puts a message on Queue 1, Program B might not be running. The queue stores the message safely until Program B starts and is ready to get the message. When Program B gets the message from Queue1, Program A might no longer be running. For this model, there is no requirement for two programs communicating with each other to be executing at the same time.
8
Chapter 15 WebSphere MQ © 2006 IBM Corporation 8 Asynchronous communication model
9
Chapter 15 WebSphere MQ © 2006 IBM Corporation 9 Asynchronous Communication Using the asynchronous model, Program A puts messages on Queue 1 for Program B to process Program B sends the responses to Queue 2 It is Program C, acting asynchronously to Program A, gets the replies from Queue 2 and processes them. Typically, Program A and Program C would be part of the same application.
10
Chapter 15 WebSphere MQ © 2006 IBM Corporation 10 Three Styles of Communication
11
Chapter 15 WebSphere MQ © 2006 IBM Corporation 11 Message Types for MQ Types of messages Datagram: message for which no response is expected. Request: A message for which a reply is requested. Reply: A reply to a request message. Report: A message that describes an event, such as the occurrence of an error or a confirmation of the arrival of a delivery.
12
Chapter 15 WebSphere MQ © 2006 IBM Corporation 12 Queue Manager
13
Chapter 15 WebSphere MQ © 2006 IBM Corporation 13 Queue Manager (QM) The QM owns and manages queues It provides services for applications, ensures that messages are: -put in the correct queue, -routes messages to other queue managers, and - processes messages through a common programming interface (MQI). When an application puts a message on a queue, the queue manager ensures that the message is: Stored safely Recoverable Delivered once, and once only, to the receiving application This is true even if a message has to be delivered to a queue owned by another queue manager; this situation is known as the assured delivery property of WebSphere MQ.
14
Chapter 15 WebSphere MQ © 2006 IBM Corporation 14 Queue Manager (QM) The QM owns and manages queues It provides services for applications, ensures that messages are: -put in the correct queue, -routes messages to other queue managers, and - processes messages through a common programming interface (MQI).
15
Chapter 15 WebSphere MQ © 2006 IBM Corporation 15 Queue Manager (QM) When an application puts a message on a queue, the queue manager ensures that the message is: -Stored safely -Recoverable -Delivered once, and once only, to the receiving application This is true even if a message has to be delivered to a queue owned by another queue manager; this situation is known as the assured delivery property
16
Chapter 15 WebSphere MQ © 2006 IBM Corporation 16 Message Queue Interface (MQI)
17
Chapter 15 WebSphere MQ © 2006 IBM Corporation 17 Message layout
18
Chapter 15 WebSphere MQ © 2006 IBM Corporation 18 Queue types
19
Chapter 15 WebSphere MQ © 2006 IBM Corporation 19 Queue types Local queue- is owned by the QM to which the application program is connected. It stores messages for programs that use the same QM. The application program does not have to run on the same machine as the queue manager. Remote queue - Owned by a different QM. A remote queue is not a real queue; it is only the definition of a remote queue to the local QM. Programs cannot read messages from remote queues. Remote queues are associated with a transmission queue.
20
Chapter 15 WebSphere MQ © 2006 IBM Corporation 20 Queue types Transmission queue - This local queue has a special purpose: it is used as an intermediate step when sending messages to queues that are owned by a different QM. Transmission queues are transparent to the application.They are used internally by the queue manager channel initiator. Initiation queue - A local queue to which the QM writes (transparently to the programmer) a trigger message when certain conditions are met on another local queue, for example, when a message is put into an empty message queue or in a transmission queue.
21
Chapter 15 WebSphere MQ © 2006 IBM Corporation 21 Channels
22
Chapter 15 WebSphere MQ © 2006 IBM Corporation 22 Channels A Channel is a logical communication link. The conversational style of program-to-program communication requires the a communications connection between each pair of applications. Channels shield applications from the underlying communications protocols.
23
Chapter 15 WebSphere MQ © 2006 IBM Corporation 23 Channels Types A Message Channel connects two queue managers through message channel agents (MCAs). A message channel is unidirectional, composed ofa sender and a receiver agent and a communication protocol. An MCA transfers messages from a transmission queue to a communication link, and from a communication link to a target queue. Bidirectional communication requires 2 channels. An MQI channel connects an MQ client to a queue manager. Clients do not have a queue manager of their own. An MQI channel is bidirectional.
24
Chapter 15 WebSphere MQ © 2006 IBM Corporation 24 Security
25
Chapter 15 WebSphere MQ © 2006 IBM Corporation 25 Data Integrity
26
Chapter 15 WebSphere MQ © 2006 IBM Corporation 26 Data Integrity(1) The top half shows a two-phase commit structure, while the MQ solution is shown in the lower half, as follows: >The first application writes to a database, places a message on a queue, and issues a sync point to commit the changes to both resources. >The message contains data that is to be used to update a second database on a separate system. Because the queue is a remote queue, the message goes to the transmission queue within this unit of work. >When the unit of work is committed, the message becomes available for retrieval by the sending MCA.
27
Chapter 15 WebSphere MQ © 2006 IBM Corporation 27 Data Integrity(2) >In the second unit of work, the sending MCA gets the message from the transmission queue and sends it to the receiving MCA on the other system, >The receiving MCA places the message on the destination queue. This is reliable because of the assured delivery property of MQ. >When committed, the message becomes available for retrieval by the second application. >In the third unit of work, the second application gets the message from the destination queue and updates the database using the data contained in the message.
28
Chapter 15 WebSphere MQ © 2006 IBM Corporation 28 Travel agency example revisited
29
Chapter 15 WebSphere MQ © 2006 IBM Corporation 29 Interfacing to WebSphere MQ MQ is available on many platforms On z/OS it has interfacing to: –CICS –IMS –Batch or TSO
30
Chapter 15 WebSphere MQ © 2006 IBM Corporation 30 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
31
Chapter 15 WebSphere MQ © 2006 IBM Corporation 31 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).
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.