Fix conventional routing endpoint discovery in FindResources#2174
Merged
jeremydmiller merged 3 commits intomainfrom Feb 14, 2026
Merged
Fix conventional routing endpoint discovery in FindResources#2174jeremydmiller merged 3 commits intomainfrom
jeremydmiller merged 3 commits intomainfrom
Conversation
…ing stale routes Re-enable endpoint discovery from routing conventions during FindResources() (originally GH-513) and fix the regression that caused it to be reverted. The fix clears the route cache after discovery so routes with null Sender created during WithinDescription mode are not reused for actual message sending. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b8a46eb to
96a4c6e
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FindResources()(originally fixed in Routing conventions need to apply to the stateful resource model operations #513, then reverted due to regression)Sendercreated duringWithinDescriptionmode are not reused for actual message sendingBackground
WolverineSystemPart.FindResources()needs to discover all transport endpoints (exchanges, queues) so they can be provisioned/torn down as stateful resources. The original fix (GH-513) calledRoutingFor()for each message type duringFindResources(), which triggeredMessageRoutingConvention.DiscoverSenders()and created the endpoints as a side effect.However,
RoutingFor()caches routes in_messageTypeRouting. Routes created duringFindResources()haveWithinDescription=true, which allows nullSenderonMessageRoute. When those cached routes were later reused for actual message sending,Envelope(message, Sender)threwNullReferenceExceptionbecauseSenderwas null.The fix calls
ClearRoutingFor()for each discovered message type after the routing loop, preserving the endpoint discovery side effect while ensuring routes get properly rebuilt with active sending agents when the host starts.Test plan
find_endpoints_through_conventions_as_part_of_find_resourcespassesStatefulResourceSmokeTestspassConventionalRoutingtests passRabbitMqTransportTestspassend_to_endtests: 23/25 pass (2 pre-existing flaky failures from stale broker state)Closes GH-513
🤖 Generated with Claude Code