You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "Anmol Saxena (Jira)" <ji...@apache.org> on 2026/09/09 09:33:00 UTC

[jira] [Commented] (ARTEMIS-6160) Include the queue/binding name (and source node) in AMQ222196 "Could not find binding" warning

    [ https://issues.apache.org/jira/browse/ARTEMIS-6160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18113248#comment-18113248 ] 

Anmol Saxena commented on ARTEMIS-6160:
---------------------------------------

Hi [~jbertram], [~devesh3559],

I'd like to work on this ticket.
                   
Looking at the code, I see two separate pieces here:

1. Queue/binding name — BindingsImpl.routeFromCluster() currently logs this.toString(), which is the address-level BindingsImpl, not     the actual queue/binding. Since the binding is already removed by the time the warning fires, I'm proposing to cache the last-known    binding name (bounded, per-address) at removal time in BindingsImpl, and use that in the warning. 

2. Source node — I checked the code path (ClusterConnectionBridge.beforeForward() and the Message headers used for cluster forwarding), and there's currently no header carrying the originating node's identity on a forwarded message. Adding this properly means stamping a new property on the message when it's forwarded and reading it back on the receiving side. That's a real change to cluster bridge behavior, not just a logging tweak, so I think it deserves its own design discussion and testing separate from this fix.

I'd like to start with #1 now, and leave #2 open for further discussion (happy to file a follow-up ticket for it if that's preferred).
Let me know if that split makes sense, or if you'd rather see both done together.

Thanks

> Include the queue/binding name (and source node) in AMQ222196 "Could not find binding" warning
> ----------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-6160
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-6160
>             Project: Artemis
>          Issue Type: Improvement
>    Affects Versions: 2.31.2, 2.54.0
>            Reporter: Devesh Chitlangia
>            Priority: Major
>
> In a clustered broker, BindingsImpl.routeFromCluster(...) logs AMQ222196 when a message forwarded from a peer node targets a binding id that no longer exists locally (the consumer/subscription was already removed).
> {*}Example{*}:
> AMQ222196: Could not find binding with id=6046772 on routeFromCluster for message=CoreMessage[messageID=6049061, ..., address=STATE.S.<tenant>.TEP.<device>, ...] binding = BindingsImpl [name=STATE.S.<tenant>.TEP.<device>]
> The warning gives only the numeric binding id, the message, and "BindingsImpl [name=<address>]" - where name is the ADDRESS, not the queue/subscription. Because the binding is already deleted when the warning fires, operators cannot resolve which queue/consumer the stale id belonged to after the fact. In high-churn deployments (many MQTT wildcard subscribers reconnecting) this warning is logged at very high volume, and tracing each id back to a consumer requires correlating other logs.
> *Requested improvement*
> When logging AMQ222196, include (where available):
>  - the last-known queue/binding name for that id, and
>  - the source node / cluster bridge that supplied the routing id.
> Note: the live consumer id cannot be printed because the binding is already removed when the warning fires - hence requesting the last-known name and the originating node, which is enough to identify the owning subscription/service without correlating separate logs.
> +*Impact*+
> Purely diagnostic/observability. No functional or routing change. Would significantly speed up troubleshooting of stale/ghost cluster bindings.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org