-
Notifications
You must be signed in to change notification settings - Fork 647
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
Default options from operations in outgoing behaviors might not be applied #6223
Comments
Any news on this? This is causing tens of thousands of exceptions for us per day |
@JackSinclairT I'm sorry to hear that this causes so many errors. This bug is very high up in the priority list but I can't give you any precise timeline right now. We hope to be able to address this issue very soon. |
@JackSinclairT FYI we just started working on this issue and we expect to have a fix available soon. We'll keep you up to date with the progress on this issue. Please make sure that you're on one of the currently supported versions of NServiceBus to ensure that you can quickly update to the patch release. |
@timbussmann thanks for the update! Any update on when this might go out? |
@JackSinclairT we identified a bunch of other options that are affected by the same issue and we have been working on verifying the potentially affected options, so there has been a bunch of unexpected work that extends the scope of this bug. We're currently evaluating different fixes so we can ship them as soon as possible to all supported versions of NServiceBus version 7. |
Will be shipped with releases: 7.7.1, 7.6.1, and 7.5.1 |
@JackSinclairT 7.7.1, 7.6.1, and 7.5.1 are available on our myget feed (https://www.myget.org/F/particular/api/v3/index.json) if you want to give it a try. I can't tell you at what point this will be available/published on the nuget feed itself as we're currently investigating another potentially related issue (but 7.7.1 should address the routing issue you've described). |
hey @JackSinclairT, patch releases have been released to NuGet for versions 7.7.2, 7.6.2 and 7.5.2 that include the fix for the issue (see the release announcement. Thanks for your patience! |
Symptoms
Message operation (send, publish, reply, subscribe, unsubscribe) settings set on the corresponding options class (e.g.
SendOptions
,PublishOptions
, etc.) might be applied to additional message operations that are invoked via custom behaviors that are registered in the outgoing pipeline. The options of the "outer" operation (the one that triggers the outgoing pipeline in the first place) might be applied if the "inner" operation (the one that is called from within a behavior in the outgoing pipeline) does not explicitly specify the same setting (e.g. routing information, correlation id, etc.) and therefore intends to use the default setting values. The default settings are "hidden" by the "outer" operation settings.Example scenario:
Sending messages (using
context.Send
) in a custom behavior that is part of the outgoing pipeline (e.g.IOutgoingLogicalMessageContext
,IOutgoingPhysicalMessageContext
, etc.) without explicitly configuring a destination (e.g.sendOptions.RouteToThisEndpoint()
, orsendOptions.SetDestination(...)
) might lead to the message sent from the behavior to be routed to an incorrect endpoint. Typically, the incorrectly routed message then ends up in the error queue with a message like this:System.InvalidOperationException: No handlers could be found for message type: ...
.Who's affected
You are affected if all of the following conditions apply:
context.Send
orcontext.Publish
.Affected (currently supported) versions: NServiceBus 7.5 - 7.7
Root cause
Settings are stored in the pipeline context, which also contains the settings configured in the
SendOptions
. If no override is configured, the default routing applies. Default values are represented by the absence of a setting.When configuring send/publish options in a message handler/saga, the following outgoing pipeline stages contain the settings from the send/publish options in the context. An operation from within the outgoing pipeline will also have access to these settings (as context state similar to a stack) if it doesn't use its own settings configuration. This will lead to behaviors to find the override information rather than the intended default setting.
Backported to
The text was updated successfully, but these errors were encountered: