WebSphere MQ V6 Fundamentals - IBM

Transcription

Front coverWebSphere MQ V6FundamentalsOverview of message queuing andWebSphere MQ V6.0Broad technical introduction tothe Websphere MQ productHands-on guide to the firststeps of building a WebSphereMQ infrastructureSaida DaviesPeter Broadhurstibm.com/redbooks

International Technical Support OrganizationWebSphere MQ V6 FundamentalsNovember 2005SG24-7128-00

Note: Before using this information and the product it supports, read the information in“Notices” on page xv.First Edition (November 2005)This IBM Redbook edition is an update to the Redpaper MQSeries Primer, REDP-0021.This edition applies to Version 6, Release 0, Modification 0, of IBM WebSphere MQ (productnumber 5724-H72). Copyright International Business Machines Corporation 2005. All rights reserved.Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADPSchedule Contract with IBM Corp.

ContentsNotices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvTrademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviiThe team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviiBecome a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xixComments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxSummary of changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiNovember 2005 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiChapter 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Chapter 2. Concepts of message queuing . . . . . . . . . . . . . . . . . . . . . . . . . . 52.1 Core concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.1 Middleware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.2 Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.3 Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.4 Point-to-point messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.1.5 Publish/subscribe messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2 Simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.1 Development focuses on business logic . . . . . . . . . . . . . . . . . . . . . . 122.2.2 Application maintenance and portability . . . . . . . . . . . . . . . . . . . . . . 132.3 Scalability and performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.4 Reliability and data integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.4.1 Exactly once delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.4.2 Units of work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.4.3 Failure handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.4.4 Quality assurance (QA) environments . . . . . . . . . . . . . . . . . . . . . . . 182.5 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.5.1 Security of access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.5.2 Security of communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.6 High availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.6.1 Service availability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.6.2 Message availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.6.3 Disaster recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.7 Monitoring and accounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.7.1 Performance monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.7.2 Accounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Copyright IBM Corp. 2005. All rights reserved.iii

Chapter 3. Facilities for message queuing provided by WebSphere MQ. 253.1 Core concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.1.1 WebSphere MQ message queuing infrastructure . . . . . . . . . . . . . . . 263.1.2 Facilities for building a WebSphere MQ infrastructure . . . . . . . . . . . 263.1.3 SupportPacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.2 Simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.2.1 Applications accessing a WebSphere MQ infrastructure . . . . . . . . . 283.2.2 Asynchronous intercommunication using WebSphere MQ . . . . . . . . 293.2.3 Generalizing destinations using WebSphere MQ . . . . . . . . . . . . . . . 293.2.4 Specific destinations using WebSphere MQ . . . . . . . . . . . . . . . . . . . 303.2.5 Providing services within a WebSphere MQ infrastructure . . . . . . . . 303.2.6 WebSphere MQ queues as an interface for accessing services. . . . 303.2.7 Standardized application programming interfaces (APIs) . . . . . . . . . 313.2.8 WebSphere MQ and WebSphere Application Server . . . . . . . . . . . . 323.2.9 Web services as an interface for accessing services . . . . . . . . . . . . 333.2.10 Simplification of failure handling with WebSphere MQ . . . . . . . . . . 343.3 Scalability and performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353.3.1 Scalability features of WebSphere MQ queue managers . . . . . . . . . 353.3.2 An architecture based on a single queue manager. . . . . . . . . . . . . . 363.3.3 Hub and spoke WebSphere MQ architectures . . . . . . . . . . . . . . . . . 373.3.4 Flexibly scaling capacity using queue manager clusters . . . . . . . . . 393.4 Reliability and data integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403.4.1 Persistent and nonpersistent messages . . . . . . . . . . . . . . . . . . . . . . 413.4.2 Units of work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423.5 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433.5.1 The Object Authority Manager (OAM). . . . . . . . . . . . . . . . . . . . . . . . 433.5.2 Secure Sockets Layer (SSL) and Transport Layer Security (TLS) . . 433.5.3 Securing communication using SSL or TLS . . . . . . . . . . . . . . . . . . . 443.6 High availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443.6.1 The role of queue manager clusters in high-service availability . . . . 453.6.2 Queue sharing groups on WebSphere MQ for z/OS. . . . . . . . . . . . . 453.6.3 High availability clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463.6.4 Disaster recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473.7 Monitoring and accounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.7.1 Performance monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.7.2 Accounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.7.3 Trace-route messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Chapter 4. Designing applications that access a WebSphere MQinfrastructure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.1 Cross-platform support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504.2 Application programming interfaces (APIs) . . . . . . . . . . . . . . . . . . . . . . . . 504.2.1 The message queue interface (MQI) . . . . . . . . . . . . . . . . . . . . . . . . 50ivWebSphere MQ V6 Fundamentals

4.2.2 APIs based on the WebSphere MQ object model. . . . . . . . . . . . . . . 514.2.3 Standardized APIs available for WebSphere MQ . . . . . . . . . . . . . . . 524.2.4 Custom adapters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554.3 WebSphere MQ messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554.3.1 The message descriptor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554.3.2 Data conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564.3.3 Message formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574.3.4 Chaining portions of a message together . . . . . . . . . . . . . . . . . . . . . 574.4 Interacting with a WebSphere MQ infrastructure . . . . . . . . . . . . . . . . . . . 584.4.1 WebSphere MQ client products . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594.4.2 Core facilities provided to a WebSphere MQ application . . . . . . . . . 594.5 Units of work and transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.5.1 Local units of work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614.5.2 Syncpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624.5.3 Commit and back out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624.5.4 Uncommitted messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624.5.5 Global units of work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634.5.6 Coordination of global units of work . . . . . . . . . . . . . . . . . . . . . . . . . 644.5.7 Two-phase commit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644.5.8 The XA specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654.5.9 The extended transactional client . . . . . . . . . . . . . . . . . . . . . . . . . . . 654.5.10 Failure handling and tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664.6 Point-to-point messaging with WebSphere MQ . . . . . . . . . . . . . . . . . . . . 674.6.1 Retrieving messages from queues . . . . . . . . . . . . . . . . . . . . . . . . . . 674.6.2 Hosting services on queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684.6.3 Backout queues and backout counts . . . . . . . . . . . . . . . . . . . . . . . . 694.6.4 Event-driven services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694.6.5 Send and forget messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704.6.6 Distribution lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714.6.7 Segmentation of messages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714.6.8 Logical grouping of messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724.6.9 Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724.6.10 Confirmation of arrival and confirmation of delivery reports . . . . . . 734.6.11 Synchronous request/reply messaging . . . . . . . . . . . . . . . . . . . . . . 734.6.12 Partially synchronous request/reply messaging . . . . . . . . . . . . . . . 734.6.13 Message expiry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744.6.14 Reply-to queue considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754.6.15 Processing of messages by a service . . . . . . . . . . . . . . . . . . . . . . . 774.7 Publish/subscribe messaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784.7.1 WebSphere MQ publish/subscribe broker . . . . . . . . . . . . . . . . . . . . 784.7.2 Interacting with the WebSphere MQ publish/subscribe broker . . . . . 794.7.3 Streams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804.7.4 Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Contentsv

4.7.5 Topics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804.7.6 Publications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814.7.7 Extending the WebSphere MQ publish/subscribe capabilities . . . . . 81Chapter 5. Understanding and configuring queue managers. . . . . . . . . . 835.1 Installation information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845.1.1 Review available WebSphere MQ maintenance . . . . . . . . . . . . . . . . 845.1.2 Statement of environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845.2 WebSphere MQ administration interfaces. . . . . . . . . . . . . . . . . . . . . . . . . 855.2.1 WebSphere MQ Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855.2.2 WebSphere MQ Explorer Healthcheck plug-in . . . . . . . . . . . . . . . . . 925.2.3 WebSphere MQ control commands . . . . . . . . . . . . . . . . . . . . . . . . . 935.2.4 WebSphere MQ for iSeries control language commands . . . . . . . . . 935.2.5 WebSphere MQ for z/OS commands . . . . . . . . . . . . . . . . . . . . . . . . 935.2.6 WebSphere MQ Script (MQSC) commands . . . . . . . . . . . . . . . . . . . 935.2.7 Programmable command formats (PCFs) . . .

WebSphere MQ V6 Fundamentals November 2005 International Technical Support Organization SG24-7128-00