Description
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.