Matt gave you a very good answer, Here is another in other angle.

Hope you know what a DATABASE is...so I am starting with a queue

Queue: Is a virtual "post box" (just like in our post office) maintained in
ActiveMQ's JVM, with which you register as a user(Consumer). So the senders
will send letters (messages) to that post box irrespective of whether you
are listening to it or not. just like you friend sending a letter to your
post box address with out knowing you are there or not.

But whenever there is a message in your queue, as a registered consumer you
will be notified and your onMessage() method will be executed (the other way
you poll the queue for any new message is also possible). Here that post box
is sharable like more than one consumer can register to that queue but ONE
MESSAGE WILL GO TO ONE CONSUMER.

If your queue is in PERSISTENT mode it will store a copy of the message it
got from senders, it will store it to the connected database (you need to
configure this in activemq.xml). it eventually delete DELIVERED messages
from that database table.

Topic: Is like a TV News Channel, What ever message it get from senders, it
will be sent/shared  to all registered VIEWERS of that TV News Channel
(Topic) . Topic is a concept of broadcasting

I highly recommend ActiveMQ in Action Book for you.

-Nag


--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Can-I-use-Active-MQ-in-this-Regard-tp3433946p3437295.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to