4 Replies Latest reply on Feb 11, 2010 7:31 AM by timfox

    Durable false not working

    pieter.martin

      Hi,

       

      I am using Hornetq 2.0.0.GA running in standalone mode.

       

      In hornetq-jms.xml my queue is defined as follows

       

      <queue name="ExecutorQueue">
                      <entry name="/queue/ExecutorQueue"/>
                      <durable>false</durable>

      </queue>

       

      However when I check via jmx using jConsole the durable attribute on the queue remains true.
      Also when I test my consumer via a server restart messages still gets delivered.

       

      Am I missing something?

       

      Further in the JMX jConsole I noticed that even after deleting a queue definition from hornetq-jms.xml and restarting the server the queue remains visible in the org.hornetq/Queue/core but disappears from hornetq/Queue/jms.

       

      Thanks

      Pieter

        • 1. Re: Durable false not working
          pieter.martin

          Some more info,

           

          I removed any definition of my queue from hornetq-jms.xml and defined the queue in hornetq-configuration.xml

           

          <queues>
                          <queue name="jms.queue.ExecutorQueue">
                                  <address>jms.queue.ExecutorQueue</address>
                                  <durable>false</durable>
                          </queue>
          </queues>

           

          Then the queue appears correctly in JMX jConsole with the durable attribute as false. However I had to delete the hornetq distro re unzip the distro and start the server with the new queue definition as above before it appeared correctly in the JMX jConsole. It seams like there is some kind of persistent caching going on with regards to the JMX management view.

           

          Thanks

          Pieter

          • 2. Re: Durable false not working
            ataylor
            If you initially created the queue durable then it would have been persisted in the bindings journal, meaning it would get reloaded when the server re started. Delete the journal and you should see  normal behaiviour.
            • 3. Re: Durable false not working
              pieter.martin
              Ah, great thanks, indeed I am seeing normal behavior now.
              • 4. Re: Durable false not working
                timfox

                Yep, once a durable queue has been created you can't make it undurable or delete by changing hornetq-jms.xml - this is to prevent people making mistakes and accidentally deleting all their data.

                 

                Queues need to be deleted via the management console, or programmatically using the core or management apis.

                 

                Just not declaring an already created queue in hornetq-jms.xml does not delete. The list of queues in hornetq-jms.xml is just the subset of queues which you wish to put into JNDI on startup, it is not an exhaustive list of queues.