[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1855) Failed fail-over doesn't trigger client's ExceptionListener
Yong Hao Gao (JIRA)
jira-events at lists.jboss.org
Wed Apr 6 03:45:33 EDT 2011
[ https://issues.jboss.org/browse/JBMESSAGING-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593941#comment-12593941 ]
Yong Hao Gao commented on JBMESSAGING-1855:
-------------------------------------------
The root cause is that the client (MDB) receives messages from JBM server via JBossConnectionConsumer. When at a moment no messages arrive it uses
MessageConsumer.receive(0)
to block and wait for any new messages. If now the connected node failed (shutdown normally) and the cluster's failoverOnNodeLeave is false, the client will finally failed to fail over and will notify the client's registered listener after clean up. However the clean up work requires all ongoing invocations to have finished before closing the JMS resources. Because there is a receive() call stay there, the clean up will wait for it to returns. As long as the receive(0) blocks there, the clean up cannot proceed and therefore the listener will never be notified.
One thing to be noted is that the receive(0) call is not directly reading from socket. Rather it waits on a lock. When messages come in asynchronously it will get notified. So the connection broken doesn't make this call returns.
To fix this, I plan to add a notification to the consumer in such a case. When failover fails, it first notifies any consumers blocked on receive(0), letting it return so the failover can go on to clean up and notify client's listeners if any.
> Failed fail-over doesn't trigger client's ExceptionListener
> -----------------------------------------------------------
>
> Key: JBMESSAGING-1855
> URL: https://issues.jboss.org/browse/JBMESSAGING-1855
> Project: JBoss Messaging
> Issue Type: Bug
> Affects Versions: 1.4.0.SP3.CP09
> Reporter: Justin Bertram
> Assignee: Yong Hao Gao
>
> If the cluster node to which a client is connected is dropped gracefully and the cluster is using FailoverOnNodeLeave = false then the client's connection will die and its exception listener will not be triggered so it will never have a chance to manually reconnect to another node of the cluster.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list