davsclaus opened a new pull request, #26805:
URL: https://github.com/apache/camel/pull/26805

   An exchange that is stuck is reported by its node id alone — a generated id 
such as `to3` — with nothing saying which line of the route that is. The value 
was already on the exchange: `ExchangeExtension.getHistoryNodeSource()` is 
documented as "the history node source:line-number where the node is located in 
the source code", is set by `CamelInternalProcessor.NodeHistoryAdvice` for 
every node, and had exactly one reader in the code base (`MessageHelper`).
   
   ### SPI
   
   `InflightRepository.InflightExchange` and 
`AsyncProcessorAwaitManager.AwaitThread` gain `getNodeSource()` (`@since 
4.23`). Both are `default` methods returning `null`, so an existing 
implementation still compiles.
   
   ### Used by
   
   | where | before | after |
   |---|---|---|
   | `DefaultShutdownStrategy` | `nodeId=to3` | `nodeId=to3, 
nodeSource=orders.camel.yaml:18` |
   | `inflight` dev console | `at: foo/to3` | `at: foo/to3 source: 
orders.camel.yaml:18` |
   | `blocked` dev console | `at: foo/to3` | `at: foo/to3 source: 
orders.camel.yaml:18` |
   | JMX `DefaultInflightRepository.browse` | `nodeId` column | `nodeSource` 
column next to it |
   | JMX `DefaultAsyncProcessorAwaitManager` await threads | `nodeId` column | 
`nodeSource` column next to it |
   | blocked-thread dump | `NodeId:` | `Source:` line |
   
   Both dev consoles also carry `nodeSource` in their JSON, and their generated 
metadata is regenerated.
   
   The shutdown one is the most useful in practice: when routes do not shut 
down in time, the log now names the line that is holding it up.
   
   Everything is `null` when message history or source location is off, so 
every view keeps its shape.
   
   ### Compatibility
   
   Adding a column to the JMX `CompositeType` is the one visible change. A 
client reading rows by item name is unaffected; one that assumes a fixed column 
count should be reviewed. Noted in the 4.23 upgrade guide, together with the 
SPI addition and the dev console JSON field.
   
   ### Testing
   
   - `InflightRepositoryNodeSourceTest` — an inflight exchange reports the 
source of the node it sits at.
   - `ManagedInflightRepositoryNodeSourceTest` — the JMX row carries 
`nodeSource` next to `nodeId`.
   - camel-core `*Inflight*`, `*AwaitManager*`, `*Shutdown*` (50 tests), the 
full camel-console suite (221 tests), and camel-management 
`*Inflight*`/`*Await*` all pass.
   
   Follow-up to CAMEL-24972 (#26802) and CAMEL-24974 (#26804); part of 
CAMEL-24844.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to