title: MassTransit - Consumer throws Exception / Publisher times out waiting for response
body: <p>I am using MassTransit and have the following-ish code in my app:</p>
  
  <pre><code>RequestMsg request = buildMeARequest();               
  SomeTypeOfResponse response = null;
  
  _serviceBus.PublishRequest(request, c =&gt;
      {
          c.Handle&lt;SomeTypeOfResponse&gt;(message =&gt; response = message);
          c.SetTimeout(TimeSpan.FromSeconds(30));
      });
  
  return response;
  </code></pre>
  
  <p>And on the consumer side, I have something like this:</p>
  
  <pre><code>public class RequestMsgConsumer : Consumes&lt;T&gt;.All
  {
      public RequestMsgConsumer(IServiceBus serviceBus)
      {
  
          _serviceBus = serviceBus;
      }
  
      public void Consume(RequestMsg request)
      {
          SomeTypeOfResponse response = doWorkToGetResponse(request);
  
          _serviceBus.Context().Publish(response);
      }
  }
  </code></pre>
  
  <p>This works great when everything goes well ... however if the <code>doWorkToGetResponse(request)</code> throws an exception (or any portion of the <code>Consume()</code> method really) the original requestor times out, there is no indication of failure.</p>
  
  <p>My original idea was to build a class like <code>Either&lt;Exception, SomeTypeOfResponse&gt;</code> so that the requester always expects this <code>Either&lt;&gt;</code> construct, but that is going to force me to always try/catch every consume method - and there are plenty of them.</p>
  
  <p>Has anybody else solved this more elegantly?</p>