1 Reply Latest reply on Mar 3, 2016 1:24 AM by Wright Liu

    Duplicate message when server shutdown and restart

    Wright Liu Newbie

      Pre-condition:

      1. I have a HornetQ cluster with two primary server: Primary1 and Primary2

      2. I have two queues for address "com.clusterTest": clusterTestQueue1 and clusterTestQueue2 on both server.

      3. I have two consumer: Consumer1 on Primary1 for "clusterTestQueue1", Consumer2 on Primary2 for "clusterTestQueue2".

       

      Issue:

      1. Send 30 messages to address "com.clusterTest" toward Primary1.

      2. Shutdown Primary when the two consumer are processing the 15th message. Then Consumer1 processed 15 messages, and  Consumer2 processed 30 messages since Primary2 is still working.

      2. Create a consumer: Consumer3 on Primary2 for "clusterTestQueue1".

      3. Restart Primary1

       

      I find that: Both Consumer3 and Consumer2 received 15 messages


      And when I reverse step2 and Step3(restart Primary1 and then create a consumer on Primary2 for "clusterTestQueue1"), the issue doesn't exists.

       

      Could anyone help?

        • 1. Re: Duplicate message when server shutdown and restart
          Wright Liu Newbie

          Refine some typo:

           

          Pre-condition:

          1. I have a HornetQ cluster with two primary server: Primary1 and Primary2

          2. I have two queues for address "com.clusterTest": clusterTestQueue1 and clusterTestQueue2 on both server.

          3. I have two consumer: Consumer1 on Primary1 for "clusterTestQueue1", Consumer2 on Primary2 for "clusterTestQueue2".

           

          Issue:

          1. Send 30 messages to address "com.clusterTest" toward Primary1.

          2. Shutdown Primary1 when the two consumer are processing the 15th message. Then Consumer1 processed 15 messages, and  Consumer2 processed 30 messages since Primary2 is still working.

          3. Create a consumer: Consumer3 on Primary2 for "clusterTestQueue1".

          4. Restart Primary1

           

          I find that: Both Consumer3 and Consumer2 received 15 messages


          And when I reverse step3 and Step4(restart Primary1 and then create a consumer on Primary2 for "clusterTestQueue1"), the issue doesn't exists.

           

          Could anyone help?