public async Task Consume(ConsumeContext <RoutingSlipActivityCompleted> context) { if (context.Message.ActivityName != ActivityName) { return; } var request = context.Message.GetVariable <TRequest>("Request"); var requestId = context.Message.GetVariable <Guid>("RequestId"); Uri responseAddress = null; if (context.Message.Variables.ContainsKey("ResponseAddress")) { responseAddress = context.Message.GetVariable <Uri>("ResponseAddress"); } if (responseAddress == null) { throw new ArgumentException($"The response address could not be found for the faulted routing slip: {context.Message.TrackingNumber}"); } var endpoint = await context.GetResponseEndpoint <TResponse>(responseAddress, requestId).ConfigureAwait(false); var response = await CreateResponseMessage(context, request); await endpoint.Send(response).ConfigureAwait(false); }