davsclaus opened a new pull request, #23532: URL: https://github.com/apache/camel/pull/23532
## Summary Adds message size tracking to Camel, capturing body and header sizes per endpoint for both incoming (IN) and outgoing (OUT) directions. - Introduces `MessageSizeStrategy` SPI and `DefaultMessageSizeStrategy` for computing body/header byte sizes (supports `byte[]`, `String`, `StreamCache`, `WrappedFile`, `File`, `Path`, `Content-Length` header fallback) - Tracks min/max/mean sizes per endpoint in `RuntimeEndpointRegistry` via exchange events (`ExchangeCreatedEvent` for IN, `ExchangeSendingEvent` for OUT) - Exposes size statistics via JMX (`RuntimeEndpointRegistry` MBean), dev console (`EndpointDevConsole`), and CLI (`camel get endpoint`) - CLI shows `BODY-SIZE`/`HDR-SIZE` columns (mean values) by default when data is available, with `--verbose` for min/max breakdown and `--sort size` support - Sizes displayed as human-readable (`512 B`, `1.5 KB`, `2.3 MB`) in CLI table, raw bytes in JSON output - Sets `CamelMessageBodySize` and `CamelMessageHeadersSize` exchange properties for IN direction, usable during routing - Auto-enabled by the dev profile; requires `messageSizeEnabled=true` and `Extended` statistics level - Includes bundled `message-size` example for Camel JBang/TUI - Includes documentation (`message-size.adoc`) and JMX docs update ## Test plan - [x] `ManagedMessageSizeTest` verifies endpoint-level size statistics and exchange properties - [x] Validated YAML DSL route via Camel MCP tools - [x] Manual testing with `camel run` and `camel get endpoint` / `camel get endpoint --verbose` / `camel get endpoint --sort -size` _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
