private static IEndpoint GetResponseEndpoint(this IInboundMessageHeaders headers) { if (headers.ResponseAddress == null) { throw new InvalidOperationException("No response address was contained in the message"); } return(headers.ObjectBuilder.GetInstance <IEndpointFactory>().GetEndpoint(headers.ResponseAddress)); }
/// <summary> /// Puts the message back on the input queue so that it can be processed again later /// </summary> public static void RetryLater() { IInboundMessageHeaders context = InboundMessageHeaders.Current; if (context == null) { throw new InvalidOperationException("No current message context was found"); } context.RetryLater(); }