-
Notifications
You must be signed in to change notification settings - Fork 78
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
[Host] Optionally include IConsumerContext and/or CancellationToken in consumer method invocation #224
Conversation
@zarusz there appears to be an issue with the SonarCloud secret
|
Yes, I believe secrets are not passed to branch builds which are from external repo clones. I will have a look when I get a chance. |
@EtherZa I've changed the actions workflow some on master, can you please rebase your changes and push again? |
src/SlimMessageBus.Host.Configuration/Builders/AbstractConsumerBuilder.cs
Outdated
Show resolved
Hide resolved
@EtherZa can you please rebase against master once more and ideally squash all your changes into 1 commit? I have looked at your changes - looks good! |
91e64e1
to
80983a4
Compare
@zarusz - No worries, I've rebased, squashed and pushed. |
80983a4
to
9ee1411
Compare
@EtherZa can you rebase once more? I see that sonar cloud integrates nicely already. After that I am happy to merge. |
9ee1411
to
a8eea57
Compare
Rebased and pushed without the unused variable. |
src/SlimMessageBus.Host.Configuration/Builders/AbstractConsumerBuilder.cs
Outdated
Show resolved
Hide resolved
5eab7f1
to
6de2929
Compare
Both SonarCloud issues resolved and pushed. |
… method invocation Signed-off-by: Richard Pringle <[email protected]>
6de2929
to
4e30201
Compare
|
This is now merged. Thanks for your contribution @EtherZa! |
Thank you! |
Added support for optionally including IConsumerContext and/or the CancellationToken in the consumer method invocation when supplying a type and method name.
As the
CancellationToken
is tied to the life of the message lock, it should be readily available in the method to prematurely terminate processing when the lock is lost.Supplying the
IConsumerContext
as an argument, as opposed to constructor or setting injection, allows for a single consumer instance where appropriate.Please note that the order of the parameters is not important.
IConsumer and IRequestHandler have not been modified so as to avoid creating a breaking change. Implementation would be trivial should there be appetite to change the signatures.
Though not direct solutions to #220 and #223, the submission addresses both issues for non-IConsumer/IRequestHandler implementations.