File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Doubt in JMS pub/sub model Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Doubt in JMS pub/sub model" Watch "Doubt in JMS pub/sub model" New topic

Doubt in JMS pub/sub model

Ranch Hand

Joined: Aug 18, 2005
Posts: 372
Got a question about the pub/sub messaging model in JMS. Let's say there is a subscriber who has subscribed to a topic. The subscriber disconnects. Later he reconnects and resubscribes to the same topic. In which of the following scenarios will the subscriber get the messages that he missed when he was disconnected?

The missed messages are PERSISTENT and the subscriber has a DURABLE subscription - Yes
The missed messages are NON-PERSISTENT and the subscription is DURABLE - No
PERSISTENT messages and NON-DURABLE subscription - No
NON-PERSISTENT messages and NON-DURABLE subscription - No

So the subscriber will get the missed messages ONLY if the messages are PERSISTENT and his subscription is DURABLE. Is my understanding right? Are there any exceptions to be considered? Please clarify
I agree. Here's the link:
subject: Doubt in JMS pub/sub model
It's not a secret anymore!