1 Reply Latest reply on Jul 25, 2011 10:10 AM by Clebert Suconic

    Topic dependency packaging for multiple apps

    Billy Sjöberg Newbie

      Hi all,


      I have multiple applications that registers as publishers/subscribers to some common topics sitting in between them.

      Is there any way I can declare the topics more than once without getting deployment errors? I have set up dependencies correctly so that each app requires the existence of particular topics using JBoss deployment.xml files. But I'm considering the best option for actually deploying the topics.


      I'd like to have each application self-contained, meaning that the hornetq-jms.xml file for each app should consist of the necessary queues/topics for that app. But if multiple applications declare the same HornetQ resource (queue or topic) I get the error message "name "myTopic" is already installed" during deployment as another app might have already registered this topic.


      It makes sense to deploy queues only in the receiving app and put a dependency for it in all senders, but topics can have multiple subscribers so that's another use case.


      I could theoretically create a common aggregated hornetq-jms.xml file and deploy it outside the application, but that would not let my apps be selfcontained.


      Is there a way to tell Hornet that:

      - I'd like this queue/topic registered if not already available?

      - Otherwise, just use the one already provided for me.