[
https://issues.apache.org/jira/browse/CAMEL-23684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-23684:
--------------------------------
Fix Version/s: 4.21.0
> BacklogTracer message history should correlate exchanges by breadcrumb ID for
> full end-to-end flow
> --------------------------------------------------------------------------------------------------
>
> Key: CAMEL-23684
> URL: https://issues.apache.org/jira/browse/CAMEL-23684
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 4.21.0
>
>
> The BacklogTracer message history (used by the message-history dev console
> and camel-tui) currently captures the latest completed exchange by tracking a
> single exchange ID and its direct correlation IDs. This works well for
> exchanges that stay within a single route or use in-memory multicast with
> correlated sub-exchanges.
> However, when routes are connected through external brokers (Kafka, SEDA,
> JMS, etc.) in an event-driven architecture, each consumer creates a new
> independent exchange with a new exchange ID. The correlation chain is broken,
> so the history only shows one slice of the flow rather than the full
> end-to-end picture.
> Camel already has a mechanism to link these independent exchanges: the
> breadcrumb ID (CamelBreadcrumbId header). This ID is propagated through
> message headers across broker boundaries, effectively linking the entire flow
> from the initial trigger through all downstream routes.
> The BacklogTracer should support grouping/correlating exchanges by breadcrumb
> ID to capture the full end-to-end message history across broker boundaries.
> This would allow the TUI history tab (and other tools) to show the complete
> flow, e.g.:
> timer -> kafka:orders -> order-dispatcher -> multicast -> kafka:fulfillment +
> kafka:notifications -> fulfillment-route + notification-route
> All linked by the same breadcrumb ID.
> This approach is lighter weight than full OpenTelemetry tracing while still
> providing the complete picture for debugging and monitoring.
> Affected files:
> -
> core/camel-base-engine/src/main/java/org/apache/camel/impl/debugger/BacklogTracer.java
> (provisional/complete history queue logic)
> -
> core/camel-console/src/main/java/org/apache/camel/impl/console/MessageHistoryDevConsole.java
> (dev console output)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)