-
Notifications
You must be signed in to change notification settings - Fork 20
Allowed injection of an IConsumerExecutionStrategy per Consumer #108
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
base: master
Are you sure you want to change the base?
Allowed injection of an IConsumerExecutionStrategy per Consumer #108
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
toizo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I'm not 100% fond of how the ConsumerOptions just passes a factory down to the builder. It would be nice if this can be consistent with how UnconfiguredMessageHandlingStrategy is configured.
Other than that, the rest is only about naming things - see my comments.
Thanks! As also commented on your other comment, I have made it consistent with the other factories to make sure it is possible to register a different execution strategy per consumer :) Please let me know if you still think there is a better way to do it. I have tried to update according to you other great comments, but let me know if there is still something that can improve. I found one issue thatI forgot to commit before the vacation. So I have included it now: the Cancellation token is now passed through the execution strategy and I have included a MessageExecutionContext in the IMessageHandlerExecutionStrategy, so the strategy can be aware of the message it is processing. |
… to include a MessageExecutionContext and CancellationToken
9db9574 to
54b22d5
Compare
Added possibility to inject an IConsumerExecutionStrategy per Consumer.
This is to enable events for a Consumer to be processed in a custom strategy.
This custom execution strategy can for instance be utilized to implement some custom resiliency mechanism.
A setup example: