Skip to content

Commit

Permalink
Merge pull request #6954 from Particular/sc-eventing-custom-queue
Browse files Browse the repository at this point in the history
Warning about custom error queue when doing ServiceControl integration
  • Loading branch information
tmasternak authored Jan 16, 2025
2 parents 77dfdcb + c2fe525 commit a24d18b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ static async Task Main()
endpointConfiguration.UseSerialization<NewtonsoftJsonSerializer>();
endpointConfiguration.EnableInstallers();
endpointConfiguration.UsePersistence<InMemoryPersistence>();
endpointConfiguration.SendFailedMessagesTo("error");

#region ServiceControlEventsMonitorCustomErrorQueue
endpointConfiguration.SendFailedMessagesTo("error-monitoring");
#endregion

var transport = endpointConfiguration.UseTransport<LearningTransport>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ static async Task Main()
endpointConfiguration.UseSerialization<NewtonsoftJsonSerializer>();
endpointConfiguration.EnableInstallers();
endpointConfiguration.UsePersistence<NonDurablePersistence>();
endpointConfiguration.SendFailedMessagesTo("error");

#region ServiceControlEventsMonitorCustomErrorQueue
endpointConfiguration.SendFailedMessagesTo("error-monitoring");
#endregion

var transport = endpointConfiguration.UseTransport<LearningTransport>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ static async Task Main()
endpointConfiguration.UseSerialization<NewtonsoftJsonSerializer>();
endpointConfiguration.EnableInstallers();
endpointConfiguration.UsePersistence<NonDurablePersistence>();
endpointConfiguration.SendFailedMessagesTo("error");

#region ServiceControlEventsMonitorCustomErrorQueue
endpointConfiguration.SendFailedMessagesTo("error-monitoring");
#endregion

var transport = endpointConfiguration.UseTransport<LearningTransport>();

Expand Down
4 changes: 4 additions & 0 deletions samples/servicecontrol/events-subscription/sample.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a24d18b

Please sign in to comment.