diff --git a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs index d79b88333c..3d052c1398 100644 --- a/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs +++ b/src/ServiceControl.AcceptanceTests/Recoverability/MessageFailures/When_ingesting_failed_message_with_missing_headers.cs @@ -34,8 +34,8 @@ public async Task Should_be_ingested_when_minimal_required_headers_is_present() //No failure time will result in utc now being used Assert.That(failure.TimeOfFailure, Is.GreaterThan(testStartTime)); - // Both host and endpoint name is currently needed so this will be null since no host can be detected from the failed q header - Assert.That(failure.ReceivingEndpoint, Is.Null); + Assert.That(failure.ReceivingEndpoint, Is.Not.Null); + Assert.That(failure.ReceivingEndpoint.Name, Is.EqualTo(context.EndpointNameOfReceivingEndpoint)); } [Test] @@ -45,10 +45,6 @@ public async Task Should_include_headers_required_by_ServicePulse() { c.AddMinimalRequiredHeaders(); - // This is needed for ServiceControl to be able to detect both endpoint (via failed q header) and host via the processing machine header - // Missing endpoint or host will cause a null ref in ServicePulse - c.Headers[Headers.ProcessingMachine] = "MyMachine"; - c.Headers[FaultsHeaderKeys.ExceptionType] = "SomeExceptionType"; c.Headers[FaultsHeaderKeys.Message] = "Some message"; }) @@ -60,11 +56,6 @@ public async Task Should_include_headers_required_by_ServicePulse() Assert.That(failure, Is.Not.Null); - // ServicePulse assumes that the receiving endpoint name is present - Assert.That(failure.ReceivingEndpoint, Is.Not.Null); - Assert.That(failure.ReceivingEndpoint.Name, Is.EqualTo(context.EndpointNameOfReceivingEndpoint)); - Assert.That(failure.ReceivingEndpoint.Host, Is.EqualTo("MyMachine")); - // ServicePulse needs both an exception type and description to render the UI in a resonable way Assert.That(failure.Exception.ExceptionType, Is.EqualTo("SomeExceptionType")); Assert.That(failure.Exception.Message, Is.EqualTo("Some message")); diff --git a/src/ServiceControl/Operations/EndpointDetailsParser.cs b/src/ServiceControl/Operations/EndpointDetailsParser.cs index c2edcef186..921949dc6d 100644 --- a/src/ServiceControl/Operations/EndpointDetailsParser.cs +++ b/src/ServiceControl/Operations/EndpointDetailsParser.cs @@ -80,8 +80,8 @@ public static EndpointDetails ReceivingEndpoint(IReadOnlyDictionary