| • Science | • People | • Locations | • Timeline |
The publish/subscribe model 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.
In the point-to-point or queuing 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.
Using Java, JMS provides a way of seperating the application from the transport layer of providing data. The same Java classes can be used to communicate with different JMS Providers by accessing the JNDI information for the desired provider. The classes first use a Connection Factory to connect to the queue or topic, and then use populate and send or publish the messages. On the receiving side, the clients then receive or subscribe to the messages.
In order to use JMS, you must have a JMS provider that can manages the sessions and queues. There are open source as well as proprietary providers, including: