The point-to-point model is a one-to-one model, in the sense that any message sent, by an application called a "message sender", can be read only by one receiving application, called a "message receiver". The destination of a point-to-point message is a queue
. A queue may contain more than one active message receiver, but the message provider ensures that the message is delivered to only one message receiver.
In message queuing, a message is a collection of data sent by one program and intended for another program. A queue manager
is a system program that provides queuing services to applications. It provides an application programming interface so that programs can put messages on, and get messages from, queues. A queue manager provides additional functions so that administrators can create new queues, alter the properties of existing queues, and control the operation of the queue manager.
Communication occurs by one program putting messages on a queue (owned by a queue manager) and another program getting the messages from the queue (see figure below). Programs can get messages that were put on a queue by other programs. The other programs can be connected to the same queue manager as the receiving program, or to another queue manager. This other queue manager might be on another system, a different computer system, or even within a different business or enterprise. There are no physical connections between programs that communicate using message queues.
A program can assign a priority to a message when it puts the message on a queue. This determines the position in the queue at which the new message is added. Programs can get messages from a queue either in the order in which the messages appear in the queue, or by getting a specific message. (A program might want to get a specific message if it is looking for the reply to a request that it sent earlier.)
The physical nature of a queue depends on the operating system on which the queue manager is running. A queue can either be a volatile buffer area in the memory of a computer, or a data set on a permanent storage device (such as a disk). The physical management of queues is the responsibility of the queue manager and is not made apparent to the participating application programs. Programs access queues only through the external services of the queue manager. They can open a queue, put messages on it, get messages from it, and close the queue. They can also set, and inquire about, the attributes of queues.