davsclaus opened a new pull request, #29889: URL: https://github.com/apache/camel/pull/29889
## Backport of #29887 Backport of #29887 (CAMEL-26945: camel-core - the time an inflight exchange has been at its node is no longer garbage) to `camel-4.18.x`. The branch has the same bug. While an exchange is at a node, its `elapsed` in the inflight dev console (`camel get inflight`) and in the JMX browse of the inflight repository is about the uptime of the machine in nanoseconds. `MessageHistory.getElapsedSinceCreated()` subtracted the wall clock millis of `getTime()` from `System.nanoTime()`. This is a cherry-pick with `-x`, with two mechanical changes: - `camel-4.18.x` has no `TimeSource`, so the default method of `MessageHistory` reads `System.currentTimeMillis()`. - The inflight dev console on `camel-4.18.x` has no descriptions of its fields, so the swap of the `elapsed` and `duration` descriptions is left out, along with the regenerated `inflight.json` and catalog files. Those were the only conflicts. The fix is the same as on `main`. `DefaultMessageHistory` measures the time at the node on its monotonic clock, and the default method subtracts the creation time from the current time in millis. `InflightRepositoryElapsedTest` applies unchanged. ## Tests On `camel-4.18.x`, with JDK 21: `InflightRepositoryElapsedTest` and the inflight and message history tests of camel-core pass (14). JIRA: https://issues.apache.org/jira/browse/CAMEL-26945 (fix version 4.18.6) _Claude Code on behalf of Claus Ibsen (davsclaus)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012nJsFsjqqFiwroeHRWaKbS -- 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]
