-
1. Re: Client hangs during failover
garytully May 5, 2010 6:35 AM (in response to daroo)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 May 6, 2010 7:47 AM (in response to garytully)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.
-
AMQ2645Test.zip 1.1 KB
-
-
3. Re: Client hangs during failover
garytully May 6, 2010 12:59 PM (in response to daroo)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 May 6, 2010 2:37 PM (in response to garytully)Thanks for the explanation. Will you create a JIRA issue to track this case?
-
-
6. Re: Client hangs during failover
daroo May 10, 2010 3:16 AM (in response to garytully)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 May 11, 2010 5:26 AM (in response to daroo)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 May 11, 2010 7:00 AM (in response to garytully)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 May 11, 2010 7:21 AM (in response to daroo)ah, my bad, sorry. have fixed it now, thanks.