2 Replies Latest reply on Oct 1, 2014 5:55 PM by Justin Bertram

    How to delete old destinations?

    Temujain Jenkins Newbie

      Hi all,

      During development we often create JMS addresses (queues and topics) and then we change their names later. I can see the old ones are still lingering in the system in funny state. How to delete/remove old unused addresses?

      Why this is a problem? After renaming a topic from, say "defaultEventTopic" to say "clientEventTopic" in hornetq-jms.xml, I started to get the following error message in JBoss server.log:

      2014-10-02 08:14:06,097 INFO [STDOUT] (A1-280) 08:14:06,097 WARN DefaultMessageListenerContainer:842 - Setup of JMS message listener invoker failed for destination 'clientEventTopic' - trying to recover. Cause: User: null doesn't have permission='DELETE_DURABLE_QUEUE' on address jms.topic.defaultEventTopic

      The problem will disappear if I add section in hornetq-configuration.xml for the deceased topic (defaultEventTopic), but that is an ugly hack because "defaultEventTopic" is not referenced anywhere in the application. There must be a better way to remove the old destinations.

      I tried jmx-console but it's pretty useless.





        • 1. Re: How to delete old destinations?
          Temujain Jenkins Newbie

          I tried deleting the contents of the <JBOSS>/server/all/data  folder and the problem seems to be disappeared.

          Is that acceptable? I know by deleting the journals I have lost all the yet to be delivered messages, it's fine with  my current situation, but I am not sure if there is a better way.

          • 2. Re: How to delete old destinations?
            Justin Bertram Master

            When a durable subscription is created on a topic that subscription is saved in the HornetQ journal (in the "bindings" section specifically) so that the subscription survives a server crash/restart.  That is why it stays around even if you change the name of the topic.  As for why you're getting that specific message I can't say exactly.  What is "DefaultMessageListenerContainer"?  What is it doing and why is it doing it when it receives that message?