The Java Message Service is defined as JSR 343, and the complete specification can be downloaded.
Message-oriented middleware (MOM) allows sending and receiving messages between distributed systems. Java Message Service (JMS) is a MOM that provides a way for Java programs to create, send, receive, and read an enterprise messaging system’s messages.
JMS defines the following concepts:
An implementation of the JMS interfaces, included in a Java EE implementation.
A Java program that produces and/or receives messages. Any Java EE application component can act as a JMS client.
An object that contains the data transferred between JMS clients. A JMS producer/publisher creates and sends messages. A JMS consumer/subscriber receives and consumes messages.
Objects created and preconfigured by an administrator. They
typically refer to
Destination, and are identified by a JNDI name. The
ConnectionFactory is used to create a connection with the
Destination is the object used by the
client to specify the destination of messages it is sending and the
source of messages it is receiving.
JMS supports two messaging models: Point-to-Point and Publish-Subscribe.
In the Point-to-Point model, a publisher sends a message to a specific destination, called a queue, targeted to a subscriber. Multiple publishers can send messages to the queue, but each message is delivered and consumed by one ...