/// <summary> /// If the auditing feature is turned on, forward the given transport to the configured audit queue. /// </summary> public virtual void ForwardMessageToAuditQueue(TransportMessage transportMessage) { if (!Feature.IsEnabled <Audit>()) { return; } MessageSender.ForwardMessage(transportMessage, TimeToBeReceivedOnForwardedMessages, AuditQueue); }
public void Invoke(BehaviorContext context, Action next) { next(); if (ForwardReceivedMessagesTo != null && ForwardReceivedMessagesTo != Address.Undefined) { MessageSender.ForwardMessage(context.TransportMessage, TimeToBeReceivedOnForwardedMessages, ForwardReceivedMessagesTo); } //To cope with people hacking UnicastBus.ForwardReceivedMessagesTo at runtime. will be removed when we remove UnicastBus.ForwardReceivedMessagesTo if (UnicastBus.ForwardReceivedMessagesTo != ForwardReceivedMessagesTo) { if (UnicastBus.ForwardReceivedMessagesTo != null && UnicastBus.ForwardReceivedMessagesTo != Address.Undefined) { MessageSender.ForwardMessage(context.TransportMessage, UnicastBus.TimeToBeReceivedOnForwardedMessages, UnicastBus.ForwardReceivedMessagesTo); } } }