Concept of Queued Messaging

The following diagram shows a process inserting a message into a queue and a second process retrieving a message.

A queue is an ordered list of messages. The messages are handled by first-in-first-out algorithm but some transports provide ways of retrieving messages out of order. Additionally, some transports support message priorities.

The queue decouples the sender and receiver, enabling messages to be sent when the receiver is not active. It enables messages to be received and processed at a later time.

There can be a number of receivers active or no receivers active. For example, a queue can be allowed to build up during the day, and its messages can be processed during the night.

It is usual for a process to create a unique queue for replies. If the queue is created using the openQueue method of the JadeMessagingFactory class with a masked queue name, the resulting queue is guaranteed to have a unique name.

A sender has no direct control over which (if any) receiver retrieves and processes a specific message.

Messages are sent to a queue manager. The receiver retrieves messages from the queue manager.