目录
WebSphere MQ
System Components
Queue Manager
Queue
Message
WebSphere MQ
System Components
Main components of a WebSphere MQ network and provides a basis for understanding the technical architecture of WebSphere MQ:
Queue managers are connected to each other by server channels, which, like client channels, are network abstractions that isolate the queue managers and, by extension, the applications from the different network protocols that may be in use in the enterprise (e.g., TCP/IP, SNA LU.62). Server channels are typed, the most common being a sender channel and a receiver channel. In contrast to client channels, server channels are unidirectional, so a sender/receiver pair are required by a given queue manager to enable bidirectional communication. Transmission and receipt of messages across channels is managed by an internal component called the Message Channel Agent (MCA), and this communication can be similarly authenticated and secured using the inbuilt SSL support.
MQI: native MQ API
Queue Manager
The queue manager is the base entity that supplies the messaging facilities used by the application. It provides access to MQ queues, which store MQ messages, and is responsible for maintaining the queues and ensuring messages are delivered to the right queue destination with the defined qualities of service. From the JMS perspective, it is that entity with which the JMS client interacts: the JMS provider.
Applications interact with the queue manager using either?JMS, the native?API?(MQI), or one of a number of other APIs. The application may establish either a local or client connection to the queue manager. A local connection requires that the application run on the same physical machine as the queue manager and uses interprocess memory to communicate with the queue manager. A client connection allows the application to run on a machine that is remote from the queue manager and, in contrast, employs a protocol exchange over the network to invoke messaging facilities. The client connection uses a network abstraction called a client channel, which is bidirectional, being designed to pass both?API?calls and results. Communication over a client channel can be optionally authenticated and secured using the inbuilt Secure Socket Layer (SSL) support.?
Queue
The MQ queue is the ultimate destination of the message; messages are sent to, received from, and moved between queues in fulfillment of the communication process. Hence it defines the underlying implementation of the JMS Destination. A queue belongs to a queue manager, which is responsible for maintaining the queue. The queue is a named entity and must be unique within the queue manager that owns it. The queue acts as a storage medium, accumulating messages that are later removed by the queue manager for transmission or by the application for processing. Message storage on the queue is based on FIFO (first in, first out), with messages being added to the end and messages (by default) being removed from the front. The messages may also be stored based on priority, with messages of higher priority being moved (in FIFO order) to the front of the queue. The queue manager additionally supports specific messages being retrieved from the queue based on identifiers. MQ queues have a controllable depth allowing the maximum number of messages that can be stored at any given time to be defined.
MQ queues are rendered as storage in process memory but are associated with a directory structure on the hard disk. If allowable memory storage (which is configurable) is exceeded, the messages (persistent or nonpersistent) temporarily spill over to the hard disk. Persistent messages are additionally logged by the queue manager to file-based logs, which enables message recovery in the event that the queue manager process fails. WebSphere MQ types queues based on their function; examples include local queues that represent an application's inbox or outbox, remote queues that are definitions on one queue manager of queues that exist on another, and transmission queues that serve as storage for outbound messages. Queues can either be statically defined by an administrator or created dynamically by an application, enabling, for instance, on-the-fly creation of a dedicated queue for a given application's replies.
Message
The message body is opaque in that it contains no specific references to the actual physical representation of the data being transported (unlike the?JMS?message).
JMS Message to MQ Message Mapping
|