Introduction to JMS
The Java Message Service (JMS) is used to develop business applications that asynchronously send and receive messages. It has been defined under the JSR 914 specification (http://jcp.org/aboutJava/communityprocess/final/jsr914/index.html). In simpler terms, JMS is a set of interfaces and associated semantics that define how a JMS client accesses the facilities of an enterprise messaging product. JMS guarantees the reliable delivery of messages between heterogeneous systems and maximizes the loose-coupling nature of components.
There are two message delivery models used by JMS.
Point-to-point or queuing model:
In this model, the messages are delivered to a destination known as a queue and then one of the consumers registered for the queue reads the message. In other words, there can be multiple senders of messages but only a single receiver can exist.
Publish and subscribe model:
This is analogous to a news bulletin board. In this model, zero or more subscribers may register...