private void LogPoisonMessageMTL(SubmissionInfo submissionInfo, SubmissionPoisonContext submissionPoisonContext)
        {
            this.storeDriverTracer.StoreDriverSubmissionTracer.TracePass <SubmissionInfo>(this.storeDriverTracer.MessageProbeActivityId, 0L, "Found poison message for {0}", submissionInfo);
            MsgTrackPoisonInfo msgTrackingPoisonInfo = new MsgTrackPoisonInfo(submissionInfo.NetworkAddress, submissionInfo.MailboxFqdn, StoreDriverSubmission.LocalIPAddress, submissionPoisonContext.MapiEventCounter.ToString() + ": " + submissionPoisonContext.ResourceGuid.ToString());

            MessageTrackingLog.TrackPoisonMessage(MessageTrackingSource.STOREDRIVER, msgTrackingPoisonInfo);
            submissionInfo.LogEvent(SubmissionInfo.Event.StoreDriverSubmissionPoisonMessageInSubmission);
        }
        public XElement GetDiagnosticInfo()
        {
            XElement root = new XElement("CurrentSubmissions");

            this.map.ForEach(null, delegate(Thread thread, MailItemSubmitter mailItemSubmitter)
            {
                SubmissionInfo submissionInfo = mailItemSubmitter.SubmissionInfo;
                string mailboxHopLatency      = submissionInfo.MailboxHopLatency;
                Guid mdbGuid                = submissionInfo.MdbGuid;
                IPAddress networkAddress    = submissionInfo.NetworkAddress;
                DateTime originalCreateTime = submissionInfo.OriginalCreateTime;
                string content              = null;
                string content2             = null;
                long num     = 0L;
                byte[] array = null;
                MapiSubmissionInfo mapiSubmissionInfo = (MapiSubmissionInfo)mailItemSubmitter.SubmissionInfo;
                num      = mapiSubmissionInfo.EventCounter;
                array    = mapiSubmissionInfo.EntryId;
                content  = mailItemSubmitter.Result.MessageId;
                content2 = mailItemSubmitter.Result.Sender;
                thread.Suspend();
                StackTrace content3;
                try
                {
                    content3 = new StackTrace(thread, true);
                }
                finally
                {
                    thread.Resume();
                }
                XElement xelement = new XElement("Submission");
                xelement.Add(new object[]
                {
                    new XElement("ThreadID", thread.ManagedThreadId),
                    new XElement("ConnectionID", mailItemSubmitter.SubmissionConnectionId),
                    new XElement("Duration", (default(DateTime) == mailItemSubmitter.StartTime) ? TimeSpan.Zero : (DateTime.UtcNow - mailItemSubmitter.StartTime)),
                    new XElement("MailboxServer", submissionInfo.MailboxFqdn),
                    new XElement("MailboxServerIP", submissionInfo.NetworkAddress),
                    new XElement("MdbName", submissionInfo.DatabaseName),
                    new XElement("MdbGuid", submissionInfo.MdbGuid),
                    new XElement("OriginalCreationTime", submissionInfo.OriginalCreateTime),
                    new XElement("MessageID", content),
                    new XElement("Sender", content2),
                    new XElement("EventCounter", num),
                    new XElement("EntryID", (array == null) ? null : BitConverter.ToString(array)),
                    new XElement("Stage", mailItemSubmitter.Stage),
                    new XElement("ErrorCode", mailItemSubmitter.ErrorCode),
                    new XElement("MessageSize", mailItemSubmitter.MessageSize),
                    new XElement("RecipientCount", mailItemSubmitter.RecipientCount),
                    new XElement("RpcLatency", mailItemSubmitter.RpcLatency),
                    new XElement("StackTrace", content3),
                    LatencyFormatter.GetDiagnosticInfo(mailItemSubmitter.LatencyTracker)
                });
                root.Add(xelement);
            });
            return(root);
        }
Пример #3
0
 public SubmissionItem(string mailProtocol, MailItemSubmitter context, SubmissionInfo submissionInfo, IStoreDriverTracer storeDriverTracer) : base(mailProtocol, storeDriverTracer)
 {
     this.Context = context;
     this.Info    = submissionInfo;
 }