There are two messaging models that are used in JMS:
Publish/Subscribe (Pub/Sub) — One-to-many communication. A producer publishes a message to a topic, where all consumers subscribing to the topic receive the message.
Point-to-point (PTP) — One-to-one communication. A producer sends a message to a queue, where it is received by a single consumer, no matter how many consumers are listening to the queue.
These messaging models are substantially the same in terms of connection and session management, message structure, delivery mode options, and delivery methods. In both messaging models, a client application can be a message producer and a message consumer.
JMS provides a set of common interfaces that can be used for creating sessions that include both Point-to-point and Publish/Subscribe producers and consumers. This feature enables what the specification calls “unified domains.”








