10 Replies Latest reply on May 8, 2013 10:45 AM by Yair Ogen

    Multiple Diverts as an Active/Active solution for durable subscribers

    Yair Ogen Expert

      Hi,

       

      I want to use durable subscribers but in an active/actuive model. Well, that's not possible due to JMS limitations that prevent multiple registrations under the same Id.

       

      I am thinking of a wotkaround using diverts. Question is how to do it?

       

      I was thinknig that consumers will listen to a queue and not a topic. This will enable regsitering multiple listeners on teh same queue. Hornet will verify only one gets a message at any given time.

       

      Problem is that diverts do not allow multiple forwarding addresses. Can I create multiple diverts for the same source queue? Here is an example:

       

      <diverts>
            <divert name="divertA">                 
               <address>jms.queue.queueA</address>
               <forwarding-address>jms.queue.queueB</forwarding-address>         
               <exclusive>false</exclusive>
            </divert>
            <divert name="divertB">                 
               <address>jms.queue.queueA</address>
               <forwarding-address>jms.queue.queueC</forwarding-address>         
               <exclusive>false</exclusive>
            </divert>
            <divert name="divertC">                 
               <address>jms.queue.queueA</address>
               <forwarding-address>jms.queue.queueD</forwarding-address>         
               <exclusive>false</exclusive>
            </divert>
      </diverts>
      

       

      Should this work?

       

      Yair