9 Replies Latest reply on May 11, 2010 7:21 AM by garytully

    Client hangs during failover

    daroo

      Hello,

       

      Release notes to version 5.3.1-fuse-00-00 say about  AMQ-2693  being fixed. Is this the same issue as  AMQ-2645  ? If so, it seems not to be fixed, at least I can easily reproduce it (client hangs infinitely) on 5.3.1-fuse-00-00 following steps described in AMQ-2645.

       

      Cheers

      Darek

        • 1. Re: Client hangs during failover
          garytully

          They are not the same issue. Can you raise an MB issue to track this hang that you can reproduce. Do you have a unit test?

          • 2. Re: Client hangs during failover
            daroo

            Yes I do have a unit test, but unfortunately my user doesn?t have rights to create issues for FUSE Message Broker project. So, I'm attaching the code here.

            • 3. Re: Client hangs during failover
              garytully

              Thanks for the test case. I see the problem. On trunk (5.4) consumers are recreated after failover in pull mode till recovery/in progress work is complete but that requires a new attribute in a command and hence a wireformat change. An alternative mechanism needs to be discovered for the 5.3.1 branch.

              The problem is that message dispatch is blocking the replies from the outstanding or in progress message sends and until the onMessage completes, the state of the consumer is unknown w.r.t message acks. Need to ponder on this a bit.

              • 4. Re: Client hangs during failover
                daroo

                Thanks for the explanation. Will you create a JIRA issue to track this case?

                • 5. Re: Client hangs during failover
                  garytully

                  http://fusesource.com/issues/browse/MB-667

                   

                  Edited by: gtully on May 7, 2010 8:14 AM

                  • 6. Re: Client hangs during failover
                    daroo

                    I?ve seen you fixed this bug. I also had a chance to test this fix and it works fine. Thanks a lot, because that was the last thing which stopped me from upgrading 5.1 to 5.3.1. I hope you release 5.3.1-fuse-01-00 soon.

                     

                    BTW. I?ve also seen you extended my unit test with additional ?third message after failover? check:

                     

                    producer.send(session.createTextMessage("test 3"));

                    assertTrue("Consumer got third message after block", twoNewMessages.await(60, TimeUnit.SECONDS));

                     

                    but is the assertion really correct? Shouldn?t be something like this?

                     

                    assertTrue("Consumer didn?t get third message after block", thirdMessageReceived.await(60, TimeUnit.SECONDS));

                     

                     

                    Cheers

                    Darek

                    • 7. Re: Client hangs during failover
                      garytully

                      Thanks for the prompt feedback, great that you were able to verify.

                       

                      On the unit test assertion text, I think that is really personal preference. Do you assert (in text) what you expect to be true or provide an indication of what went wrong if it fails? I prefer to assert (in text) the expected outcome

                      • 8. Re: Client hangs during failover
                        daroo

                        I understand and I'm not going to discuss personal preferences any further  

                        But still, the last assertion uses wrong CountDownLatch instance: twoNewMessages instead of thirdMessageReceived.

                        • 9. Re: Client hangs during failover
                          garytully

                          ah, my bad, sorry. have fixed it now, thanks.