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