Wednesday, November 14, 2007

Message Queue Characteristics

Message Queues can be characterized by the following attributes:


Guaranteed delivery of messages are provided by persistent queues, which store messages in files or databases. Non-persistent queues store messages in memory and thus message delivery is not guaranteed if the message queue provider fails. A persistent message queue is required to confirm the receipt and receive acknowledgement of the delivery of a message.

Transaction Support

Messages can be grouped together into a transaction, such that either none or all of the messages in the transaction would be processed by the client.

Messaging Models

The two types of domain models or messaging models are Peer-to-peer and Publish-subscribe. In the peer-to-peer model, the message from the queue is received by one recipient after which it is deleted from the queue. In the publish-subscribe model, the publisher sends a message to the queue with a topic and all registered subscribers receive the message.


A non-durable subscriber can receive messages only if it is connected to the message queue. A durable subscriber can receive unexpired messages after it reconnects to the queue.

Push/Pull Delivery Mechanism

Messages can be delivered by a queue using either a push mechanism where the queue actively sends the messages to the receiver, or a pull mechanism where the receiver polls the queue periodically to check for messages.

Synchronous and Asynchronous messaging

In synchronous messaging, a message isn't stored on a queue while sending, but a direct connection is established to a client where the message is placed on a target queue thus providing real-time delivery.

In asynchronous messaging, the message is placed onto a remote queue and is sent to an intermediary store for delivery to a client.