1 Reply Latest reply on Nov 29, 2010 11:45 PM by clebert.suconic

    Making Diverts Persistent

    smjain

      Hi,

       

      I will be looking to work at the issue

       

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

       

      Will need more information on the implementation part.

       

      I was looking into the ManagementServiceImpl class registerDivert method.

       

      The link to the user forum https://jira.jboss.org/browse/HORNETQ-89 points that other resources like Queues and Bridges are persistent using the

       

      StorageManager(could not figure it out exactly). I can see in the  ManagementServiceImpl class methods for registerQueue and registerBridge . Do

       

      they persist the resource into the journal. Do I need to do the same .Guide me on this.

       

      Thanks

      Shashank

        • 1. Re: Making Diverts Persistent
          clebert.suconic

          Yes, we need to persist this on the journal.

           

           

          HornetQ has three journals: One for messages, one for bindings and one for JMS objects. On the case of diverts, we need to send those to the bindings journal.

           

           

          For destinations, those are controlled at the JMSStoragemanager. You can take a look at the code, as it's going to be somewhat similar.

           

           

           

          On the case of diverts, we need to do it at the regular StorageManager / JournalStorageManager. (Use Ctrl-F/Ctrl-T on eclipse to find the exact package)

           

           

           

          (notice that for every public method on the JournalStorageManager, you have it defined on the StorageManager interface. So this will be easy to be eventually implemented using a DB approach).

           

           

          Also, to support this change, you will need to change HornetQServer::deployDivert to have a persist parameter. If persist=true, then you store it on the Storagemanager.

           

           

          You will need to load it on JournalStorageManager::loadBindings and recreate the divert structures.

           

           

           

          I can give you more help as you progress on this. Please ask any question if you feel stuck.