You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by artnaseef <ar...@artnaseef.com> on 2015/01/28 21:11:21 UTC

Re: why consumer need to create Queue() to consume it?

Session.createQueue() may or may not actually create the queue.  It's a
feature of JMS that's not really needed with ActiveMQ.  It would be just as
good to create a queue via "new ActiveMQQueue(name)".

ActiveMQ creates queues dynamically, on-demand.  Calling createQueue()
doesn't really change this operation.

In fact, looking inside ActiveMQSession.java, createQueue() simply calls
"new ActiveMQQueue(name)" or "new ActiveMQTempQueue(name)".

Since AMQ creates queues on use, whether used by a producer or consumer,
removing queues is really only a cleanup task that may not even work since
the queue may still be in-use.



--
View this message in context: http://activemq.2283324.n4.nabble.com/why-consumer-need-to-create-Queue-to-consume-it-tp4690517p4690563.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: why consumer need to create Queue() to consume it?

Posted by artnaseef <ar...@artnaseef.com>.
Ahh - interesting.  I am concerned with that logic because there's going to
be some time between starting up a producer and starting up a consumer - and
ActiveMQ provides asynchronous messaging.  That use-case creates an
order-of-operations dependency over an asynchronous messaging layer.

Also, it is important to avoid having a Queue for which no consumers are
active - that can easily lead to a slow-consumer problem, which is the
number 1 cause of problems for ActiveMQ use in my experience.

Are the consumers somehow untrusted to consume from the right Queues?



--
View this message in context: http://activemq.2283324.n4.nabble.com/why-consumer-need-to-create-Queue-to-consume-it-tp4690517p4690678.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.