mikehadlow/EasyNetQ — pull request #126 by micdenny (2013-12-13 18:31:37+00:00)
Title: Request now throws exception if the responder throws on server

In other words, requests will not timeout anymore on responder exception.

It preserves all the old behaviors copying the message to the error queue, but it also guarantee to fast respond to the requester, telling that something went wrong on server.

The implementation use a couple of custom header to notify that the message is Faulted (IsFaulted) and another header value to passing the original exception message (ExceptionMessage).

In this first implementation I've just passed back the task.Exception.InnerException.Message to avoid overloading the fault response message with a complete serialization of the exception object, because I actually don't know the impact on transferring big headers, and even because not all exception objects are guaranteed to be serializable.