From c2fe5253905979c1563f1abf1f672d2d880d489c Mon Sep 17 00:00:00 2001 From: Tomasz Masternak Date: Mon, 13 Jan 2025 13:26:25 +0100 Subject: [PATCH] warn about custom error queue when doing integration --- .../ServiceControlContracts_3/EndpointsMonitor/Program.cs | 5 ++++- .../ServiceControlContracts_4/EndpointsMonitor/Program.cs | 5 ++++- .../ServiceControlContracts_5/EndpointsMonitor/Program.cs | 5 ++++- samples/servicecontrol/events-subscription/sample.md | 4 ++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/samples/servicecontrol/events-subscription/ServiceControlContracts_3/EndpointsMonitor/Program.cs b/samples/servicecontrol/events-subscription/ServiceControlContracts_3/EndpointsMonitor/Program.cs index 02523c90f21..8fed864a851 100644 --- a/samples/servicecontrol/events-subscription/ServiceControlContracts_3/EndpointsMonitor/Program.cs +++ b/samples/servicecontrol/events-subscription/ServiceControlContracts_3/EndpointsMonitor/Program.cs @@ -11,7 +11,10 @@ static async Task Main() endpointConfiguration.UseSerialization(); endpointConfiguration.EnableInstallers(); endpointConfiguration.UsePersistence(); - endpointConfiguration.SendFailedMessagesTo("error"); + +#region ServiceControlEventsMonitorCustomErrorQueue + endpointConfiguration.SendFailedMessagesTo("error-monitoring"); +#endregion var transport = endpointConfiguration.UseTransport(); diff --git a/samples/servicecontrol/events-subscription/ServiceControlContracts_4/EndpointsMonitor/Program.cs b/samples/servicecontrol/events-subscription/ServiceControlContracts_4/EndpointsMonitor/Program.cs index 32ad87742fb..4b8a37ea646 100644 --- a/samples/servicecontrol/events-subscription/ServiceControlContracts_4/EndpointsMonitor/Program.cs +++ b/samples/servicecontrol/events-subscription/ServiceControlContracts_4/EndpointsMonitor/Program.cs @@ -11,7 +11,10 @@ static async Task Main() endpointConfiguration.UseSerialization(); endpointConfiguration.EnableInstallers(); endpointConfiguration.UsePersistence(); - endpointConfiguration.SendFailedMessagesTo("error"); + +#region ServiceControlEventsMonitorCustomErrorQueue + endpointConfiguration.SendFailedMessagesTo("error-monitoring"); +#endregion var transport = endpointConfiguration.UseTransport(); diff --git a/samples/servicecontrol/events-subscription/ServiceControlContracts_5/EndpointsMonitor/Program.cs b/samples/servicecontrol/events-subscription/ServiceControlContracts_5/EndpointsMonitor/Program.cs index 32ad87742fb..f9a56f34622 100644 --- a/samples/servicecontrol/events-subscription/ServiceControlContracts_5/EndpointsMonitor/Program.cs +++ b/samples/servicecontrol/events-subscription/ServiceControlContracts_5/EndpointsMonitor/Program.cs @@ -11,7 +11,10 @@ static async Task Main() endpointConfiguration.UseSerialization(); endpointConfiguration.EnableInstallers(); endpointConfiguration.UsePersistence(); - endpointConfiguration.SendFailedMessagesTo("error"); + +#region ServiceControlEventsMonitorCustomErrorQueue + endpointConfiguration.SendFailedMessagesTo("error-monitoring"); +#endregion var transport = endpointConfiguration.UseTransport(); diff --git a/samples/servicecontrol/events-subscription/sample.md b/samples/servicecontrol/events-subscription/sample.md index 11a95f1296a..ce7901d3e29 100644 --- a/samples/servicecontrol/events-subscription/sample.md +++ b/samples/servicecontrol/events-subscription/sample.md @@ -85,6 +85,10 @@ In order to get notifications when the exposed ServiceControl events occur, crea snippet: ServiceControlEventsHandlers +> [!IMPORTANT] +> In order to prevent infinate message loops (processing of an integration event fails, the faulting message is moved to the ServiceControl error queue and triggers yet another integration event) the monitoring endpoint must use a dedicated error queue, separte from the ServiceControl one. + +snippet: ServiceControlEventsMonitorCustomErrorQueue ## Notes on other transports