This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch worktree-happy-tickling-stream
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b036adb5cfc1ad932759acf78f57d6a162b8e548
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jun 5 21:40:38 2026 +0200

    CAMEL-23672: camel-jbang - TUI History badge counts by breadcrumbId
    
    Use breadcrumbId header to correlate related exchanges so parent and
    child exchanges from multicast/splitter count as one logical exchange
    in the tab badge. Falls back to exchangeId when no breadcrumbId present.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../camel/dsl/jbang/core/commands/tui/CamelMonitor.java      | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
index 5c837bd1e96a..3d83e8aeed8d 100644
--- 
a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
+++ 
b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/CamelMonitor.java
@@ -1092,7 +1092,17 @@ public class CamelMonitor extends CamelCommand {
         long healthDownCount = hasSelection
                 ? sel.healthChecks.stream().filter(hc -> 
"DOWN".equals(hc.state)).count() : 0;
         long historyCount = hasSelection
-                ? historyTab.historyEntries.stream().map(e -> 
e.exchangeId).distinct().count()
+                ? historyTab.historyEntries.stream()
+                        .map(e -> {
+                            if (e.headers != null) {
+                                Object bid = e.headers.get("breadcrumbId");
+                                if (bid != null) {
+                                    return bid.toString();
+                                }
+                            }
+                            return e.exchangeId;
+                        })
+                        .distinct().count()
                 : 0;
         boolean hasTraces = hasSelection && !traces.get().isEmpty();
         int httpCount = hasSelection ? sel.httpEndpoints.size() : 0;

Reply via email to