public void Invoke(IncomingContext context, Action next) { next(); MessageAuditer.Audit(new SendOptions(ForwardReceivedMessagesTo) { TimeToBeReceived = TimeToBeReceivedOnForwardedMessages }, context.PhysicalMessage); }
public void Invoke(IncomingContext context, Action next) { next(); var sendOptions = new SendOptions(AuditQueue) { TimeToBeReceived = TimeToBeReceivedOnForwardedMessages }; //set audit related headers context.PhysicalMessage.Headers[Headers.ProcessingStarted] = DateTimeExtensions.ToWireFormattedString(context.Get <DateTime>("IncomingMessage.ProcessingStarted")); context.PhysicalMessage.Headers[Headers.ProcessingEnded] = DateTimeExtensions.ToWireFormattedString(context.Get <DateTime>("IncomingMessage.ProcessingEnded")); MessageAuditer.Audit(sendOptions, context.PhysicalMessage); }