New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handler of all failed messages by handling IFailed<object> #22
Comments
I'm not sure if that will work 😁 First thing to look for would be what your IoC container returns when resolving a list of |
Sorry should have been more clear on that. Calling |
oh sorry, what I meant was this: Try and see what the container returns when resolving a list of |
Base problem seems to be that stacking generics like I guess if Basically I am looking for a way to intercept all failed messages (after all retries have failed) regardless of type to be able to send it to telemetry for tracking. Much just like the example of using Decorating IErrorHandler works but context is lost and by that also our original correlationId. |
Made a pull request with a proposed solution |
Fixed in Rebus.ServiceProvider 5.0.2 🙂 Thanks @Tsjunne for your contribution! 👍 |
Trying to create a handler to handle all failed messages by implementing
IHandleMessages<IFailed<object>>
.Documentation suggests that implementing
IHandleMessages<object>
will call the handler for all messages but my constraint of IFailed does not seem to create a match when resolving handlers.I am on .net core using default IServiceProvider. Checking assembly scanning shows that my handler gets registered but not called for failed messages.
The text was updated successfully, but these errors were encountered: