[rabbitmq-discuss] BrokerUnreachableException on MS Framework

Mark Ward ward.mark at gmail.com
Tue Aug 7 18:05:32 BST 2012

It appears depending on which framework the .net client is executed upon 
the BrokerUnreachableException exception will have more information to help 
identify why "None of the specified endpoints were unreachable" was thrown.

When the .NET client is executed on the Microsoft .NET Framework 4.0 the 
RabbitMQ.Client.Exceptions.BrokerUnreachableException is thrown but does 
not contain any information in the inner exception on why an endpoint was 
unreachable.  I have found in the RabbitMQDotNetClient source the 
BrokerUnreachableException contains parameters to collect the connection 
errors via a dictionary class.  This information is hidden unless 
.ToString() is called on the class.  When running on the Microsoft .NET 
framework 4.0 the .ToString() does not output any detailed information as 
to why the exception occurred.  

When the Mono 2.10.8 runtime is used the client will throw the same 
exception but the .ToString() does output detailed information about the 
possible cause of the exception.  The inner exception is also set.

I am working through learning how the Access Control works in RabbitMQ and 
to validate some of my assumptions I am setting up unit tests to make sure 
the access control settings restrict my test clients from performing the 
restricted action.  This means I am expecting the exceptions and I am not 
to worried about getting them. What I am worried about is once in 
production I will not have a controlled environment and will need more 
information about the connection failure. We will not be running on the 
mono framework.

Is there a bug with the BrokerUnreachableException running on the .NET 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120807/6a77f497/attachment.htm>

More information about the rabbitmq-discuss mailing list