Brighter
Brighter copied to clipboard
[Bug] TimedOutboxArchiver is always calling async version of archiver
Describe the bug
TimedOutboxArchived is not checking whether the IAmOutbox is sync or async, it is always calling OutboxArchiver.ArchiveAsync. This causes background exception when outbox have sync implementation. Messages are not archived.
To Reproduce
Register synchronous outbox provider and outbox archiver. You will see exceptions logged in the background
Exceptions (if any)
fail: Paramore.Brighter.OutboxArchiver[0]
Error while archiving from the outbox
System.NullReferenceException: Object reference not set to an instance of an object.
at Paramore.Brighter.OutboxArchiver.ArchiveAsync(Int32 minimumAge, CancellationToken cancellationToken, Boolean parallelArchiving) in /_/src/Paramore.Brighter/OutboxArchiver.cs:line 81
Further technical details
- Brighter version 9.9.10
- Include the output of
dotnet --info - The OS (Window, Linux, MacOs, etc)
Note to self: we need to check that this works in V10.