Set EndpointName on RabbitMqRouting so sending endpoints are named in health snapshots (GH-3270)#3273
Merged
Conversation
…ts are named in health snapshots (GH-3270) RabbitMQ exchange+routing-key sending endpoints (RabbitMqRouting) never set EndpointName, so they fell through to the synthetic Uri and showed as a blank / "unknown" Name in EndpointCollection.CollectEndpointHealth() (and could not be joined to per-endpoint sent metrics). RabbitMqRouting now sets a recognizable EndpointName: "{exchange}/{routingKey}" for a named exchange, or just the routing key for the default exchange (which routes by key = the target queue name). The broker-connection status half of the issue is already satisfied on main: RabbitMqChannelAgent (the base of RabbitMqSender) implements IReportConnectionState, and EndpointCollection.connectionStateOf reaches through the sending agent to the sender, so the snapshot's ConnectionState reports Connected/Disconnected rather than Unknown. Added a regression test asserting that contract. (AgentState has no Reconnecting state today, so that value is not yet reported.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jun 29, 2026
Open
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.
Closes #3270.
Name fix (the bug)
RabbitMQ exchange + routing-key sending endpoints (
RabbitMqRouting) setExchangeNameandBrokerRolebut neverEndpointName, so they fell through to the base default (the syntheticrabbitmq://exchange/{name}/routing/{key}Uri). InEndpointCollection.CollectEndpointHealth()that surfaces as a blank /"unknown"Name (and makes per-endpoint sent metrics impossible to join to a recognizable endpoint).RabbitMqRoutingnow sets a recognizableEndpointName:"{exchange}/{routingKey}"(e.g.orders/high-priority)Status (already satisfied on main)
The issue also asked for a broker-connection-aware sender status instead of
Unknown. That's already in place:RabbitMqChannelAgent(the base ofRabbitMqSender) implementsIReportConnectionState, andEndpointCollection.connectionStateOf(ISendingAgent)reaches through the sending agent to the sender — so the snapshot'sConnectionStatereportsConnected/Disconnected. Added a regression test asserting that contract.(Note:
AgentStatehas onlyConnected/Disconnectedtoday, soReconnectingis not yet reported — a possible small follow-up.)Tests
Broker-free unit tests (4): named-exchange and default-exchange routing names, the name is not the synthetic Uri, and RabbitMQ senders implement
IReportConnectionState.🤖 Generated with Claude Code