Skip to content

CAMEL-23648: camel-jbang - TUI improvements: route topology service and diagram renderer#23675

Merged
davsclaus merged 4 commits into
mainfrom
CAMEL-23656/route-topology-service
Jun 1, 2026
Merged

CAMEL-23648: camel-jbang - TUI improvements: route topology service and diagram renderer#23675
davsclaus merged 4 commits into
mainfrom
CAMEL-23656/route-topology-service

Conversation

@davsclaus

@davsclaus davsclaus commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • CAMEL-23656: Add RouteTopologyDumper SPI that computes inter-route connections (direct, seda, kafka, etc.) and exposes them via a route-topology dev console
  • CAMEL-23661: Add topology diagram renderers (ASCII/Unicode and PNG) to camel-diagram, with camel cmd route-topology --theme support matching the existing route-diagram command pattern

Details

Route Topology Service (CAMEL-23656)

  • New RouteTopologyDumper SPI in camel-api analyzes route definitions to find shared endpoints
  • DefaultRouteTopologyDumper implementation detects direct, seda, disruptor connections and external messaging (kafka, jms, etc.)
  • RouteTopologyDevConsole exposes topology as JSON with optional live metrics (exchangesTotal/exchangesFailed)
  • camel cmd route-topology CLI command for viewing topology

Topology Diagram Renderer (CAMEL-23661)

  • TopologyLayoutEngine — Sugiyama-style layered graph layout (layer assignment, crossing minimization, coordinate assignment)
  • TopologyAsciiRenderer — ASCII/Unicode box-drawing text diagrams with ANSI colors
  • TopologyImageRenderer — PNG rendering via Java AWT Graphics2D
  • TopologyHelper — JSON parsing and metrics enrichment
  • CLI options: --theme (ascii/unicode/dark/light/transparent), --description, --metric, --output, --box-width, --font-size
  • Terminal image display via JLine (Kitty/iTerm2/Sixel protocols)

Test plan

  • TopologyDiagramTest — 14 layout/rendering tests (linear, fan-out, fan-in, diamond, cycles, metrics, description mode)
  • TopologyDumperTest — 3 integration tests with CamelContext
  • RouteTopologyDevConsoleTest — 3 dev console tests
  • All 121 camel-diagram tests pass
  • Manual testing with route-topology example

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-diagram
  • core/camel-api
  • core/camel-base-engine
  • core/camel-console
  • core/camel-core-engine
  • core/camel-support
  • docs
  • dsl/camel-cli-connector
  • dsl/camel-jbang/camel-jbang-core

ℹ️ Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the test-dependents label to force testing all dependents.

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-core: 1 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
Build reactor — dependencies compiled but only changed modules were tested (10 modules)
  • Camel :: API
  • Camel :: Base Engine
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Console
  • Camel :: Core Engine
  • Camel :: DSL :: CLI Connector
  • Camel :: Diagram
  • Camel :: Docs
  • Camel :: JBang :: Core
  • Camel :: Support

⚙️ View full build and test results

@davsclaus davsclaus changed the title CAMEL-23656: Add route topology service to compute inter-route relationships CAMEL-23648: camel-jbang - TUI improvements: route topology service and diagram renderer Jun 1, 2026
@davsclaus davsclaus force-pushed the CAMEL-23656/route-topology-service branch from 4a8a391 to 81308b2 Compare June 1, 2026 14:03
@apupier

apupier commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

build failure due to new Jenkinsfile added without Mycila configuration provided, will be fixed with #23679

davsclaus and others added 4 commits June 1, 2026 16:37
…onships

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…route visualization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…topology diagram

- Replace --diagram boolean with --theme (ascii/unicode/dark/light/transparent)
  matching the route-diagram command pattern
- Add --output for saving diagrams to file (PNG or text)
- Add --description to show route descriptions instead of route IDs
  for architecture-level diagrams with less noise
- Add --metric to include live exchange counters on nodes
- Add description field to TopologyNode SPI record
- Add metrics support directly in route-topology dev console via
  ManagedRouteMBean (same pattern as route-structure)
- Extract TopologyImageRenderer as reusable class for PNG rendering
- Remove edge labels from topology diagrams to reduce visual clutter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davsclaus davsclaus force-pushed the CAMEL-23656/route-topology-service branch from 81308b2 to ac2d4cf Compare June 1, 2026 14:37
@davsclaus davsclaus merged commit e063e97 into main Jun 1, 2026
7 checks passed
@davsclaus davsclaus deleted the CAMEL-23656/route-topology-service branch June 1, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants