gjek
1
Hello
Is there a way I can implement a global exception handler, similar to that of Asp.net Core. I want to log my exception to Sentry.
I this to log only after the retry mechanism is going to move the message to the error queue. I have seen the .Failed in the recoverability.
How can I resolve dependencies inside the .Failed
WilliamBZA
(William Brander)
2
You can subscribe to the Error Notifications to get notified when a message is being retried or sent to the error queue: Error notifications • NServiceBus • Particular Docs
gjek
3
How to resolve dependencies inside those handlers?
WilliamBZA
(William Brander)
4
You could resolve them in the class that is doing the subscription and include a closure around them from within the actions.