[ 
https://issues.apache.org/jira/browse/QPID-1779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689989#action_12689989
 ] 

Martin Ritchie commented on QPID-1779:
--------------------------------------

We should also take a look at the FailoverHandler as it handles failure to 
Failover in two distinct ways.
1) If connection is not achieved:
                _amqProtocolHandler.getConnection().exceptionReceived(
                        new AMQDisconnectedException("Server closed connection 
and no failover " +
                                "was successful", null));

2) If connection is achieved but cannot resubscribe:
                _amqProtocolHandler.exceptionCaught(_session, e);

> Session close as a result of disconnection will block the client
> ----------------------------------------------------------------
>
>                 Key: QPID-1779
>                 URL: https://issues.apache.org/jira/browse/QPID-1779
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M2.1, M3, M4, 0.5
>            Reporter: Martin Ritchie
>         Attachments: CloseAfterConnectionFailureTest.java, 
> QPID-1779-SessionCloseBlockFix.patch
>
>
> Summary:
> When the connection is closed due to a network or protocol error attempting 
> to cleanly shutdown the open objects will cause the client to block.
> Closing consumers will succeed as they have a default timeout of 30s.
> Closing a session uses -1 i.e. wait for ever, so will block the client code.
> Closing the connection uses a decreasing timeout is the only sure way of 
> cleaning up.
> This however poses a problem for Mule users as their reconnection logic will 
> be fired through the onException handler and explicitly close all the objects 
> rather than just the connection.
> Test Case attached along with potential patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to