Java Message System provides two models for messaging: the point-to-point or queuing model, and the publish and subscribe or topic model. Identity Manager supports both models.
In the point-to-point model, a producer posts messages to a particular queue and a consumer reads messages from the queue. Here, the producer knows the destination of the message and posts the message directly to the consumer’s queue.
The point-to-point model has the following characteristics:
Only one consumer will get the message.
The producer does not have to be running at the time the receiver consumes the message, nor does the receiver need to be running at the time the message is sent.
Every message successfully processed is acknowledged by the receiver.
The publish and subscribe model, on the other hand, supports publishing messages to a particular message topic. Zero or more subscribers may register interest in receiving messages on a particular message topic. In this model, neither the publisher nor the subscriber know about each other. A good metaphor for this model is the anonymous bulletin board.
The publish and subscribe model has the following characteristics:
Multiple consumers can receive messages.
A timing dependency exists between publishers and subscribers. The publisher has to create a subscription before clients can subscribe. Once subscribed, subscribers have to remain continuously active to receive messages, unless a durable subscription has been established. In the case of a durable subscription, messages published while the subscriber is not connected will be redistributed when the subscriber reconnects.
For more information about JMS, see http://www.sun.com/software/products/message_queue/index.xml