Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

JMS Difference Between Queue and Durable Topic

Posted on 2010-11-29
2
Medium Priority
?
1,467 Views
Last Modified: 2013-11-15
I'm trying to figure out the difference between a Durable Topic and a Queue in JMS.

At the surface, queues and topics differ in that a queue has 1 consumer but topics can have 0,1 or n consumers.

I think that's where the differences end - but not really in this case because a durable topic can have only one active subscriber at a time ( http://download.oracle.com/javaee/5/tutorial/doc/bncfu.html ).

To my understanding, messages in a queue are persisted until they are consumed.  Same with a durable topic.  For both, a  Queue and Durable Topic the consuming process does not have to be running when messages are produced and the messages will be delivered when the consumer is brought up.

0
Comment
Question by:sevzas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
Bart Cremers earned 2000 total points
ID: 34234017
A queue saves a message until one consumer arrives and then delivers the message to that single consumer. Even when more consumers exist, only one will get it.

A durable topic saves messages for all registered subscribers. This means that one a new consumer arrives, it will register itself using a unique name. The topic assures that every subscriber to the topic will receive every message that it gets, even if a subscriber is not online.
0
 

Author Closing Comment

by:sevzas
ID: 34238222
Good answer! Thanks!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question