Solved

JMS Difference Between Queue and Durable Topic

Posted on 2010-11-29
2
1,429 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

A list of useful business intelligence software.
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now