Beispiel #1
0
        public void Invoke(IncomingContext context, Action next)
        {
            next();

            MessageAuditer.Audit(new SendOptions(ForwardReceivedMessagesTo)
            {
                TimeToBeReceived = TimeToBeReceivedOnForwardedMessages
            }, context.PhysicalMessage);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        void SendToSite(TransportMessage transportMessage, Site targetSite)
        {
            transportMessage.Headers[Headers.OriginatingSite] = GetDefaultAddressForThisSite();

            //TODO: derive this from the message and the channelType
            var forwarder = HandleLegacy(transportMessage, targetSite) ??
                            Builder.Build <IForwardMessagesToSites>();

            forwarder.Forward(transportMessage, targetSite);

            Notifier.RaiseMessageForwarded(Address.Local.ToString(), targetSite.Channel.Type, transportMessage);

            // Will forward the message to the configured audit queue if the auditing feature is enabled.
            MessageAuditer.ForwardMessageToAuditQueue(transportMessage);
        }