I am doing the following: 

1. I start a broker with persitent="false" and no destinations defined in
it's xml cfg file. 
2. I then start a producer that looks up a queue, called Q.REQ, via the
Context.lookup() approach
3. The producer sends 20 messages to the queue called Q.REQ w/delivery mode
set to NON_PERSISTENT
4. The producer exits
5. I bounce the broker
6. I then bring up my consumer, which looks up the Q.REQ via
Context.lookup() and it successfully read all 20 messages

So it appears to me that destinations do outlive a restart of the broker
even w/out persistent messaging. 

Joe

  

James.Strachan wrote:
> 
> On 9/4/07, tmi <[EMAIL PROTECTED]> wrote:
>>
>> Any JMS destinations that you create in your Java producer/consumer using
>> javax.jms.Session.createQueue() or createTopic() will not outlive a
>> restart
>> of ActiveMQ.
> 
> They will if you use persistent messaging and you don't consume all
> the messages on a queue/topic, then on restart you recreate your
> consumer - or you specify them on startup the next time...
> http://activemq.apache.org/configure-startup-destinations.html
> 
> 
>> Queues/topics that you want to outlive a broker restart need to be
>> created
>> directly in the broker, e.g. using some sort of JMX console. For those
>> there
>> are also APIs to delete these queues/topics again.
> 
> FWIW using a destination from Session.createQueue() /
> Session.createTopic() to send/consume messages has the same effect as
> creating the destination via JMX.
> 
> i.e. the broker only allocates resources for new destinations when
> they are actually used by a producer / consumer.
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Jms-Destination-lifetime-question-tf4346951s2354.html#a12490761
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to