3 Replies Latest reply on Feb 28, 2011 9:57 AM by Aaron Harshbarger

    Custom Expiry Queue not working in JBoss AS 6.0

    Aaron Harshbarger Newbie

      I have been trying to set the <expiry-address> for one of my queues to be a custom expiry queue that is then processed by a MDB.  No matter what I do, the expired messages in my queue is forwarded to the default ExpiryQueue.


      I have added the following to the <JBOSS 6.0>/server/default/deploy/horetq/hornetq-jms.xml file


            <queue name="MyQueue">
               <entry name="/queue/my/myQueue"/>

           <queue name="MyExpiryQueue">
              <entry name="/queue/my/myExpiryQueue"/>


      I then added to the <JBOSS 6.0>/server/default/deploy/horetq/hornetq-configuration.xml file


           <address-setting match="jms.queue.MyQueue">




           NOTE: I added the above entry both before and after the default <address-setting match="#"> settings.  I also removed the

                     default # match setting all together.


      I then have a MDB setup with the @MesageDriven annotation with "destinationType='javax.jms.Queue'" and "destination='/queue/my/myExpiryQueue'"


      I have sent messages directly to the /queue/my/myExpiryQueue MDB with success.  But no matter what, when the message expires in the /queue/my/myQueue, it gets sent to the /ExpiryQueue.  I've also confirmed this with the /admin-console information.


      Any ideas?


      P.S.  I assume I can put my custom queue and <address-settings> in separate files that end with the -hornetq-configuration.xml and -hornetq-jms.xml names.  I've tried both ways and both without success.





        • 1. Custom Expiry Queue not working in JBoss AS 6.0
          Clebert Suconic Master

          We have had issues with dependency ordering with separate files.



          it should however work if you're using the single file.



          Maybe it's a bug, and it's probably fixed on trunk now.

          • 2. Custom Expiry Queue not working in JBoss AS 6.0
            Aaron Harshbarger Newbie

            I did perform a build from the trunk and it is fixed.  I can now direct expired messages to my custom queue.  Does anyone when the next production release of HornetQ is estimated to be?


            P.S.  The depenency ordering with separate files is still an issue.  I had to include all my queues and settings in the core XML files (i.e. configuration / jms) rather than having them my own.  So is this a known bug that is somehwere in the issue tracking system somewhere?  I would like to watch it so I know when it's resolved.




            • 3. Custom Expiry Queue not working in JBoss AS 6.0
              Aaron Harshbarger Newbie

              I wasn't able to find any information on how to upgrade HornetQ on JBoss 6.0.  So I upgraded HornetQ with the latest <trunk> version by copying the following files from the hornetq/build/jars folder to the following JBoss folders:


                  <JBOSS 6.0>/client/hornetq-core-client.jar

                  <JBOSS 6.0>/client/hornetq-jms-client.jar

                  <JBOSS 6.0>/common/lib/hornetq-bootstrap.jar

                  <JBOSS 6.0>/common/lib/hornetq-core.jar

                  <JBOSS 6.0>/common/lib/hornetq-jms.jar

                  <JBOSS 6.0>/common/lib/hornetq-logging.jar

                  <JBOSS 6.0>/server/default/deploy/jms-ra.rar/hornetq-ra.jar


              I was not however able to find the following file in the hornetq <trunk> release:

                  <JBOSS 6.0>/common/lib/jboss-as-hornetq-int.jar


              If anyone knows whether or not I upgraded the HornetQ libraries correctly on JBoss 6.0, please let me know.


              Any assistance would be greatly appreciated.