Web-based workloads on z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


WebSphere MQ message queues and the queue manager

Web-based workloads on z/OS

A message queue is used to store messages sent by programs. They are defined as objects belonging to the queue manager.

When an application puts a message on a queue, the queue manager ensures that the message is:
  • Stored safely
  • Is recoverable
  • Is 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, and is known as the assured delivery property of WebSphere® MQ.

Queue manager

The component of software that owns and manages queues is called a queue manager (QM). In WebSphere MQ, the message queue manager is called the MQM, and it provides messaging 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 called the Message Queue Interface (MQI).

The queue manager can retain messages for future processing in the event of application or system outages. Messages are retained in a queue until a successful completion response is received through the MQI.

There are similarities between queue managers and database managers. Queue managers own and control queues similar to the way that database managers own and control their data storage objects. They provide a programming interface to access data, and also provide security, authorization, recovery and administrative facilities.

There are also important differences, however. Databases are designed to provide long-time data storage with sophisticated search mechanisms, whereas queues are not designed for this. A message on a queue generally indicates that a business process is incomplete; it might represent an unsatisfied request, an unprocessed reply, or an unread report.

Types of message queues

Several types of message queues exist. In this text, the most relevant are the following:

  • Local queue

    A queue is local if it is owned by the queue manager to which the application program is connected. It is used to store messages for programs that use the same queue manager. The application program doesn't have to run on the same machine as the queue manager.

  • Remote queue

    A queue is remote if it is owned by a different queue manager. A remote queue is not a real queue; it is only the definition of a remote queue to the local queue manager. Programs cannot read messages from remote queues. Remote queues are associated with a transmission queue.

  • 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 queue manager. Transmission queues are transparent to the application; that is, they are used internally by the queue manager initiation queue.

    This is a local queue to which the queue manager 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. Two WebSphere MQ applications monitor initiation queues and read trigger messages, the trigger monitor and the channel initiator. The trigger manager can start applications, depending on the message. The channel initiator starts the transmission between queue managers.

  • Dead-letter queue
    A queue manager (QM) must be able to handle situations when it cannot deliver a message, for example:
    • Destination queue is full.
    • Destination queue does not exist.
    • Message puts have been inhibited on the destination queue.
    • Sender is not authorized to use the destination queue.
    • Message is too large.
    • Message contains a duplicate message sequence number.

    When one of these conditions occurs, the message is written to the dead-letter queue. This queue is defined when the queue manager is created, and each QM should have one. It is used as a repository for all messages that cannot be delivered.





Copyright IBM Corporation 1990, 2010