6 Replies Latest reply on Feb 7, 2012 3:50 PM by claudio4j

    HornetQ Deployer... not undeploying queues?

    tfennelly

      I'm back looking at integrating HornetQ in JBoss ESB.  I downloaded the latest version of AS 5.1.0 EAP from QA (Release ID: JBoss [EAP] 5.1.0.Branch (build: SVNTag=JBPAPP_5_1_0_Branch date=201007091220)) and ran the HornetQ install script in the extras folder.

       

      I noticed something I wasn't expecting and was thinking it might be a bug in the deployer.  If I add a new queue definition to hornetq-jms.xml (deploy/hornetq/hornetq-jms.xml), save it... allow the deployer to redeploy the new config... then remove the new queue definition again... allow it to redeploy again... it looks as though the queue is still deployed (looking in the JMX console).

       

      See what I mean here - http://www.screencast.com/t/ZWFiMjEz

        • 1. Re: HornetQ Deployer... not undeploying queues?
          clebert.suconic

          The queue needs to be manually destroyed after undeployed. Undeploy will only destroy the JMS part (which is basically the JNDI). It won't destroy the queue itself as that could mean losing valid data. It was a design decision. (Undeploy != destroy).

          • 2. Re: HornetQ Deployer... not undeploying queues?
            clebert.suconic

            https://jira.jboss.org/browse/HORNETQ-438

             

             

            I see that the JMS Management Object is not being removed after the JMS Undeployment.

            • 3. Re: HornetQ Deployer... not undeploying queues?
              ataylor

              Tom, is this actually an issue or just digfferent to how JBM works?

              • 4. Re: HornetQ Deployer... not undeploying queues?
                tfennelly

                Hey Andy... I guess it depends on what's behind those MBeans that remain listed in the JMX console.

                 

                As you'd know... 2 beans are added when a queue is deployed... one for the JMS bits and one that seems to be related to the core hornetq destination.  When I removed/undeployed the queue from the hornetq-jms.xml file and added a new one, both beans relating to the previous queue remained listed in the console.  Shouldn't at least the JMS related bean be removed?  When I did a restart, the JMS related bean for the previous queue did get removed.  Does this suggest a potential issue?

                 

                Maybe it's a bit confusing listing any of these beans in the JMX console after the destinations have been removed from all user configs?  I think Clebert was suggesting removing them if there were no messages left in them, which seems to make sense.

                 

                T.

                • 5. Re: HornetQ Deployer... not undeploying queues?
                  steven.landers

                  I'm having the same issue currently.  A quick scan of the HornetQ documentation gives some information on deleting queues, but only in reference to the queues managed via the admin-console.  None of my queues display in the admin-console.

                   

                  When I simply added/removed queues to/from the xml as you described, the list grows to become the union of all the queues I've ever created.

                   

                  Help?  How do I remove these?

                  • 6. Re: HornetQ Deployer... not undeploying queues?
                    claudio4j

                    I just stumble upon this thread, and want to share the twiddle command to destroy the queue

                     

                    ./twiddle.sh -u admin -p admin invoke  "org.hornetq:module=Core,type=Server" destroyQueue jms.queue.FILA1

                     

                    Or you can do it in jmx-console.