<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.4">
<TITLE>IOExceptions and the java client api</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">In the javadoc almost every method is documented as throwing the checked IOException &quot;if an error&nbsp; is encountered&quot;, but there's no mention of the unchecked exceptions that may be thrown.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">My understanding after using the client for a while is that the IOException isn't likely to be thrown. In the case of a server disconnect the actual exception thrown would be the unchecked com.rabbitmq.client.ShutdownSignalException or a derived exception. Making any code that relies on catching IOException for failure handling / reconnect logic broken.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">I think the javadoc should mention all exceptions that may be thrown and when they would be expected.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Furthermore, I personally think that the IOException is almost as course grained as declaring that all methods throws Exception - not only does this make for unnecessary cluttered code when using the client, all invocations must be wrapped in a try/catch block, but it doesn't give any real information about the underlying problem; Server shutdown, pipe broken, dodgy data on the wire.. </FONT></P>

<P><FONT SIZE=2 FACE="Arial">My suggestion is to have a hierarchy of unchecked exceptions with real meaning clearly documented in the api - giving users the option of catching the exceptions that can be recovered from while allowing other exceptions to be propagated to the caller.</FONT></P>
<BR>

<P><FONT SIZE=2 FACE="Arial">Cheers,</FONT>

<BR><FONT SIZE=2 FACE="Arial">Henric</FONT>
</P>
<BR>

<DIV>&nbsp;</DIV><br>The information contained in this email is strictly confidential and for the use of the 

addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or 

disclose to others this message or any attachment. Please also notify the sender by replying to this email or by 

telephone (+44 (0)20 7896 0011) and then delete the email and any copies of it. Opinions, conclusions (etc.) that do 

not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG Index 

plc is a company registered in England and Wales under number 01190902. VAT registration number 761 2978 07. Registered 

Office: Friars House, 157-168 Blackfriars Road, London SE1 8EZ. Authorised and regulated by the Financial Services 

Authority. FSA Register number 114059.</br></BODY>
</HTML>