public string ClassifyFailure(ClassifiableMessageDetails failureDetails)
        {
            if (failureDetails.ProcessingAttempt == null)
            {
                return(null);
            }

            var instanceId = EndpointInstanceId.From(failureDetails.ProcessingAttempt.Headers);

            return(instanceId?.EndpointName);
        }
        private IEnumerable <FailedMessage.FailureGroup> CreateFailureGroups(string messageType, FailedMessage.ProcessingAttempt attempt)
        {
            var failureDetails = new ClassifiableMessageDetails(messageType, attempt.FailureDetails, attempt);

            foreach (var classifier in classifiers)
            {
                var failureGroupTitle = classifier.ClassifyFailure(failureDetails);
                if (failureGroupTitle == null)
                {
                    continue;
                }

                var prefix = string.Format(GroupPrefixFormat, attempt.Headers.ProcessingEndpointName());

                var fullTitle = $"{prefix}{failureGroupTitle}";
                yield return(new FailedMessage.FailureGroup
                {
                    Id = DeterministicGuid.MakeId(classifier.Name, fullTitle).ToString(),
                    Title = fullTitle,
                    Type = classifier.Name
                });
            }
        }
Пример #3
0
 public string ClassifyFailure(ClassifiableMessageDetails failureDetails)
 {
     return(failureDetails.MessageType);
 }
Пример #4
0
 public string ClassifyFailure(ClassifiableMessageDetails failureDetails)
 {
     return(failureDetails.Details?.AddressOfFailingEndpoint);
 }