Chapter 2. Product selection
2.3 WebSphere MQ
IBM WebSphere MQ is an established and reliable message queuing
middleware platform. A message queuing infrastructure built upon WebSphere MQ technology can provide an available, reliable, scalable, secure, and maintainable transport for messages with exactly once delivery assurance. Figure 2-3 shows the architectural overview for WebSphere MQ, including the interface for Java Message Service (JMS) and the Message Queuing Interface (MQI).
Figure 2-3 Architectural model of WebSphere MQ
MQI is the core API provided by WebSphere MQ. It is a procedural API suitable for applications developed within procedural programming languages. The MQI also defines structures, constants, and basic data types required to interact with WebSphere MQ. Procedural languages like C and COBOL most likely utilize MQI directly, while object-oriented languages like Java and C++ are supported with object-oriented APIs built upon MQI.
JMS Interface
Message Queuing Interface
Channel
Queue
Manager
Queues
Channel AgentMessage
Object Authority
WebSphere MQ also supports XMS, a programming API that allows access from C, C++, and .NET applications.
Queue managers are the core element within a WebSphere MQ messaging infrastructure. They provide queuing services to applications and manage the queues that belong to them. Queue managers ensure that object attributes are changed according to the commands they receive. They trigger special events when certain conditions are met and they put messages onto the correct queue. Every application that wants to access a WebSphere MQ messaging
infrastructure needs to be connected to a queue manager within this
infrastructure. Applications can only retrieve messages from queues hosted by the queue manager to which they are connected, but they can send messages to queues hosted by other queue managers, as long as a network link exists between both queue managers. A machine with a WebSphere MQ installation can host multiple queue managers; the amount is limited only by the resources of the machine.
WebSphere MQ defines different kinds of queues: Local queues
Local queues are the only type of queues that represent a real queue and hold messages.
Transmission queues
Transmission queues utilize message channels to transmit messages to remote queue managers. They provide a queue manager with knowledge of how to route messages to a single destination queue manager. Any
messages sent with a queue manager namethe same as the name of the transmission queue are placed upon that transmission queue.
Alias queues
An alias queue is a representation of another target queue, which has a different name. Alias queues can be used to enhance flexibility regarding naming.
Model queues
Model queues provide the attributes of a local queue that can be created dynamically by an application. Dynamically created queues are instances of local queues and can hold messages. They can, for example, be used as dynamic reply queues in request-reply scenarios.
Remote queues
Remote queues are used to define routes to other queue managers within the WebSphere MQ messaging infrastructure. This involves mapping queue manager names to transmission queues, and mapping queue names to different queue names on remote queue managers.
A channel is a communication object used by distributed queue managers. There are two types of channels:
Message channels, which are unidirectional and transfer messages from one queue manager to another
MQI channels, which are bidirectional and transfer MQI calls from a WebSphere MQ client to a queue manager and responses from a queue manager to the client
Every channel in WebSphere MQ is a network link between two Message Channel Agents (MCAs). A connection performed by an application connecting to a queue manager is also performed by an MCA, even though it is not performed from within a queue manager.
Channel exits are user-written libraries that are called at defined places in the processing sequence of an MCA. They can be used to do additional processing on messages, for example, encryption or data compression. Based on the functionality and place where they are called, there are different types of exits (message exit, message-retry exit, receive exit, security exit, send exit, and auto-definition exit).
WebSphere MQ provides features to assure security of access, authentication of identity, and security and integrity of communication. The Object Authority Manager (OAM) is the default authorization service for command and object management. All actions performed by an application connected to a queue manager are authenticated by the OAM.
WebSphere MQ provides high availability through workload balancing and failover capabilities. It supports the concept of queue manager clusters consisting of a set of queue managers. Applications requesting a particular service can connect to any queue manager within the cluster. The queue manager to which the application is connected automatically load balances the request with the others. Queue managers can dynamically join or leave clusters and can be hosted on different machines, which is especially useful in a
distributedenvironment where capacity is scaled to accommodate the current load through multiple servers rather than one mainframe or high-capacity server. WebSphere MQ provides reliability and data integrity by supporting units of work as well as persistent and non-persistent messages.
Units of work performed by applications accessing a WebSphere MQ
infrastructure can include sending and receiving messages, as well as updates to databases. WebSphere MQ can coordinate all resources to ensure that a unit of work is only completed if all actions within that unit of work complete
infrastructure can be included in units of work that are coordinated by WebSphere Application Server.
WebSphere MQ supports the concept of persistent and non-persistent
messages. Persistent messages are retained during system failures but provide comparable low performance, while non-persistent messages provide high performance but may be lost during system failures.
WebSphere MQ contains monitoring and accounting functionality. It provides real-time performance information about flow of messages, it allows report generation for queue manager usage on application level base, and it provides facilities to identify the route that a messages took through a WebSphere MQ infrastructure or interconnected WebSphere MQ infrastructures.
Administration of WebSphere MQ is typically done using control commands or the WebSphere MQ Explorer administrative interface (Windows or Linux® only). You can find more information about IBM WebSphere MQ at the WebSphere MQ home page:
http://www.ibm.com/software/integration/wmq/