JMS Messaging Models by R4R Team

JMS Messaging Models:-

The JMS API supports two type of models as follows
1 Point-to-Point Model
2 Publisher/Subscriber Model

1 Point-to-Point Model:-

1 In point-to-point messaging model, a producer creates and sends a message which will be received only by a single consumer.

2 In point-to-point model, the message destination is called “Queue”.

3 Point-to-Point characteristics,
 a. Each message has only one consumer.
 b. A sender and a receiver of a message have no timing dependencies. The receiver can fetch the message whether or not it was running when the client sent the message.
 c. The receiver acknowledges the successful processing of a message.

2 Publisher/Subscriber Model:-

1 In publish/subscribe model, any number of clients can subscribe to a message destination and when a client sends (publishes) a message to the destination, that message is received by all clients who have subscribed to that destination.

2 In this model, the message producer is called publisher and the consumers are called subscribers. Also the message destination is called “Topic”.

3 Publish/Subscribe model characteristics,
 a. Each message can have multiple consumers.
 b. Publishers and subscribers have a timing dependency. A client that subscribes to a topic can consume only messages published after the client has created a subscription, and the subscriber must continue to be active in order for it to consume messages.

Leave a Comment:
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!