From 4372cad13873fae49da1ba13c26b5367155c17e9 Mon Sep 17 00:00:00 2001 From: Terry Burns-Dyson Date: Sun, 7 Jan 2024 07:38:24 -0500 Subject: [PATCH] Updated readme for new service configuration --- readme.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/readme.md b/readme.md index e9b39ac..75889e7 100644 --- a/readme.md +++ b/readme.md @@ -46,6 +46,32 @@ ServiceCollection.AddMediatorOutbox(configure => ); ``` + +#### Processing Configuration + +When using the background processing, you can configure process timeouts and whether exceptions should retry. + +```csharp +ServiceCollection.AddMediatorOutbox(configure => + configure + .UseSqlServerOutbox("connection string") + .WithBackgroundProcessing(x => + x.WithSettings(s => { + s.Interval = TimeSpan.FromSeconds(5) + s.BackOffOnException = TimeSpan.FromSeconds(5); + s.MaximumBackOff = TimeSpan.FromSeconds(60); + s.ShutdownOnException = true; + })) + ); +``` + +Defaults; + +* Interval = 5 seconds +* BackOffOnException = 5 seconds +* MaximumBackOff = 60 seconds +* ShutdownOnException = false + #### Issues * The SqlServer implementation is not yet complete. It is not yet possible to configure the table name