activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <>
Subject Re: How to setup multiple queues
Date Wed, 02 Jan 2013 13:28:35 GMT
Yes, I think we understand what you're trying to do, but it's not clear why
you need step 1. The queues don't need to be created ahead of time (like,
for example in IBM MQ series). They will be created automatically when a
producer tries to send to it or a consumer tries to receive from it.

JMS doesn't provide facilities to "create queues" on the broker as that's
an admin feature (see comment for Session#createQueue: "Note that this
method is not for creating the physical queue. The physical creation of
queues is an administrative task and is not to be initiated by the JMS

The broker does provide runtime abilities to create queues in an
administrative role. You could connect via JMX and the BrokerView has a
"addQueue" method you can call programmatically.

On Wed, Jan 2, 2013 at 6:22 AM, jainmanglesh <>wrote:

> I think I am not clear in providing information here. Let me try one more
> time.
> So according to requirement, I need to create queue at run time in java
> code
> (because I would come to know the number of queues to create at run time).
> this would be independent class.
> There are three part (you can say three classes) of the whole
> project(requirement here)
> 1. a class creating queue
> 2. a producer class putting messages/events on queues created in step1.
> 3. a consumer class taking messages/events from queues created in step1.
> The queues created in step1 will be used by producer/consumer in step2/3.
> Both producer and consumer are like third party using queues created in
> step1.
> Unfortunately I cannot have producer using queues created in step1.
> I am not sure if I am still clear or not. i tried to find this kinda
> requirement on internet but I could not get much help except a method to
> create queue at runtime (createQueue) or having queues at front (in xml
> file)
> for the comment "using a producer to send to x, will cause x (queue or
> topic) to be created"
> the producer is in separate class.
> The only other option is to create physical queue by just creating a junk
> producer to send junk message/even at first, which will atleast create
> queues on server which could be later used by the third party producer. and
> the same way, at the consumer side I can write logic to throw away junk
> message/event.
> Did I make myself clear here :-( .
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at

*Christian Posta*
twitter: @christianposta

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message