File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Topic vs Queue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Topic vs Queue" Watch "Topic vs Queue" New topic
Author

Topic vs Queue

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9618
    
    2

Guys,

What is the difference between a Queue and a Topic in an MDB?. We set this to the destinationType property of the activationConfig. What difference does this make to the MDB? Please help guys!

Thanks in advance.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
These are two different methods of messaging. Queue is used for point to point messaging means there will be one receiver of the message. There can be more but the message will be received to one of them. It also guarantees delivery of the message, means message will be there in the queue unless it is consumed by someone.

whereas Topic is used for Pub/Sub messaging or broadcasting a message to topic and all the listeners against that topic can consume the message.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9618
    
    2

Originally posted by Ali Gohar:
These are two different methods of messaging. Queue is used for point to point messaging means there will be one receiver of the message. There can be more but the message will be received to one of them. It also guarantees delivery of the message, means message will be there in the queue unless it is consumed by someone.

whereas Topic is used for Pub/Sub messaging or broadcasting a message to topic and all the listeners against that topic can consume the message.


Thanks!
Ashraf Abu-Aisheh
Ranch Hand

Joined: Apr 17, 2009
Posts: 88
Many thanks Ali Gohar


SCJP 5 - 79%
SCWCD 5 - 100%
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Topic vs Queue