Solved

JMS Difference Between Queue and Durable Topic

Posted on 2010-11-29
2
1,443 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
2 Comments
 
LVL 13

Accepted Solution

by:
Bart Cremers earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

685 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