Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Copyright IBM Corporation 2011
5.4.1.1 Introduction to WebSphere MQ Copyright IBM Corporation 2011 Unit objectives After completing this unit, you should be able to: Explain the positioning of messaging and queuing in the current business environment Provide a high-level view of WebSphere MQ functions Describe the breadth of coverage of WebSphere MQ products Copyright IBM Corporation 2011 The enterprise IT environment of today I T environments are increasingly heterogeneous and complex The role of modern middleware is to integrate and simplify Transactions Legacy systems and applications Networks Databases Intranets Value chain extranets Internet Customers Copyright IBM Corporation 2011 IBM WebSphere reference architecture Business services WebSphere Business Monitor Infrastructure services Development services WebSphere Business Integration Modeler, WebSphere Integration Developer Management services Interaction services WebSphere Portal Server Process services WebSphere Process Server Information services WebSphere Information Integrator Partner services WebSphere Partner Gateway Business application services WebSphere Application Server Access services WBI and WebSphere Adapters, HATS Connectivity services, ESB WebSphere MQ WebSphere Enterprise Service Bus, WebSphere Message Broker Service registry Copyright IBM Corporation 2011 Why are interfaces so expensive to build and maintain? Application interface logic is intertwined with business logic Tightly integrated interfaces are difficult to change The more interfaces, the more complex the application interface logic may exceed business logic. Reuse becomes difficult and impractical Copyright IBM Corporation 2011 Service-oriented architecture (SOA) Message queuing Abstracts connectivity logic from application Traditional message brokering Abstracts connectivity and mediation logic from application Message and service brokering Reduces application to core business functions (that is, a service) Application Application Connectivity, mediation, and additional logic Direct connectivity Connectivity, mediation, and additional logic buried in application Application Connectivity logic SERVICES Connectivity, mediation, and additional logic Mediation and additional logic Additional logic Connectivity and mediation logic Degree of flexibility and reuse Lines of code Copyright IBM Corporation 2011 Program-to-program communication B A Queue Application Application Copyright IBM Corporation 2011 Synchronous application design model B A Queue 1 Queue 2 Copyright IBM Corporation 2011 Extended asynchronous application design model B A C Queue 1 Queue 2 Copyright IBM Corporation 2011 Time independence B A B A B A B A Not available Not available Not available Not available Copyright IBM Corporation 2011 Three styles of communication Conversational A B A B Messaging Call- and- return A Call B B Return to A Copyright IBM Corporation 2011 WebSphere MQ eliminates application network concerns Applications Applications Network Networking interface Applications MQI Queue manager Applications MQI Queue manager Networking interface Networking interface MCA MCA Copyright IBM Corporation 2011 Local and remote queues concept Program B Program A Program C QM2: Local queue, transmit queue Q1: Local queue Queue manager QM1 Queue manager QM2 Q2: Local queue System 1 System 2 MQPUT Q2, QM2 MQPUT Q1 MQGET Q1 MQGET Q2 MQI Dead letter queue Copyright IBM Corporation 2011 MQI calls Major calls MQCONN MQCONNX MQDISC MQOPEN MQCLOSE MQPUT MQPUT1 MQGET MQSUB MQSUBRQ Minor calls MQBEGIN MQCMIT MQBACK MQINQ MQSET Applications MQI Queue manager Queue manager object Namelist object Process definition object Copyright IBM Corporation 2011 Message composition Set by application and queue manager Header MQMD (message descriptor) Application data Any sequence of bytes Meaningful only to the sending and receiving applications Not meaningful to the queue manager Application data Header Message = header + application data Copyright IBM Corporation 2011 Parallel processing application design Car Flight Hotel MQPUT CAR.RENTAL MQPUT FLIGHT MQPUT HOTEL MQGET reply-to queue CAR.RENTAL FLIGHT HOTEL MQPUT MQPUT MQPUT Reply-to queue Copyright IBM Corporation 2011 Triggering Process definition object MQPUT A.Q Program A Trigger types: FIRST DEPTH EVERY Application queue (A.Q) Initiation queue (I.Q) Trigger monitor 1 2 3 4 6 5 MQGET I.Q MQGET A.Q Program B Queue manager Copyright IBM Corporation 2011 Client/server application model Insurance agent Insurance agent Insurance agent Application clients Queue = service Message = request Reply-to queue name in message descriptor Multiple instances of server possible Insurance quotations Application server Insurance data Copyright IBM Corporation 2011 WebSphere MQ client WebSphere MQ application Communications stack Client stub WebSphere queue manager Communications stack Server connection Client system Server system (no queue manager exists on this system) Communication link Copyright IBM Corporation 2011 Unit of work 3 Unit of work 1 Data integrity Unit of work Write Send Sync point Receive Write Sync point database database Database Database Two phase commit Unit of work 2 Write Put Sync point A.Q (xmitq) B.Q Get Write Sync point Asynchronous model Synchronous model Copyright IBM Corporation 2011 Remote queue manager Security |USERID| | Message context Local queue manager Queues Administrative commands MCA MCA Authentication encryption Database MQMD Application data Copyright IBM Corporation 2011 Unit summary Having completed this unit, you should be able to: Explain the positioning of messaging and queuing in the current business environment Provide a high-level view of WebSphere MQ functions Describe the breadth of coverage of WebSphere MQ products Copyright IBM Corporation 2011 Checkpoint questions (1 of 2) 1. WebSphere MQ uses an interface for programs to access resources called: a. The program-to-program API. b. The Message Queue Interface. c. The synchronous model. d. Triggering. 2. True or False: WebSphere MQ only supports messaging and queuing in an asynchronous environment. 3. True or False: In WebSphere MQ triggering, the queue manager starts the triggered program. Copyright IBM Corporation 2011 Checkpoint answers (1 of 2) 1. WebSphere MQ uses an interface for programs to access resources called: a. The program-to-program API. b. The Message Queue Interface. c. The synchronous model. d. Triggering. Answer: b. 2. True or False: WebSphere MQ only supports messaging and queuing in an asynchronous environment. Answer: False. WebSphere MQ also supports messaging and queuing in a synchronous environment. 3. True or False: In WebSphere MQ triggering, the queue manager starts the triggered program. Answer: False. The trigger monitor starts the triggered application. Copyright IBM Corporation 2011 Checkpoint questions (2 of 2) 4. A message consists of: a. Application data. b. A WebSphere MQ trailer. c. A security header. d. A message descriptor. e. All the above. 5. All WebSphere MQ messages have a header. It is the: a. MQXQH (transmission header). b. MQDLK (dead letter header). c. MQMD (message descriptor). d. MQTH (trigger header). Copyright IBM Corporation 2011 Checkpoint answers (2 of 2) 4. A message consists of: a. Application data. b. A WebSphere MQ trailer. c. A security header. d. A message descriptor. e. All the above. Answer: a and d, although it is possible for a message to contain only a message descriptor and no application data. Security information, known as the message context, is part of the message descriptor. 5. All WebSphere MQ messages have a header. It is the: a. MQXQH (transmission header). b. MQDLK (dead letter header). c. MQMD (message descriptor). d. MQTH (trigger header). Answer: c. The MQMD (message descriptor) is always included a WebSphere MQ message.