Skip to content
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

Ability to pass options/headers when using InvokeAsync #1151

Open
MichalTichy opened this issue Nov 24, 2024 · 1 comment
Open

Ability to pass options/headers when using InvokeAsync #1151

MichalTichy opened this issue Nov 24, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@MichalTichy
Copy link

Is your feature request related to a problem? Please describe.

I am trying to pass metadata (e.g., userId, etc.) alongside messages in message headers. When using SendAsync or PublishAsync, I can easily pass options as method param. However, InvokeAsync does not allow this.

I've tried passing options using the WithDeliveryOptions method. The problem is that routing then does not find handlers that do not request a wrapped message (DeliveryMessage<T>).

Describe the solution you'd like
It would be helpful if InvokeAsync could accept options in the same way that SendAsync does.
Or is there any other approach that would solve my problem?

Describe alternatives you've considered

Currently, I pass the user ID using a field intended for tenancy.

Additional context

The metadata I need is processed by middleware and is not required in the handlers.

@jeremydmiller jeremydmiller added this to the 4.0 milestone Dec 2, 2024
@jeremydmiller
Copy link
Member

@MichalTichy This is going to be tedious. I think I'd like to push this off until Wolverine 4 so we can make a breaking API change to add DeliveryOptions as an optional parameter to InvokeAsync() instead of having to create umpteen overloads

@jeremydmiller jeremydmiller added the enhancement New feature or request label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants