This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-jbang-examples.git
The following commit(s) were added to refs/heads/main by this push:
new a71a841 Add send-test example for TUI Send Message testing
a71a841 is described below
commit a71a84114d06fb2d1e32ff2a6d46acdc8a0f4836
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu May 28 12:50:44 2026 +0200
Add send-test example for TUI Send Message testing
Co-Authored-By: Claude <[email protected]>
---
camel-jbang-example-catalog.json | 19 +++++++++++++++++++
send-test/README.md | 21 +++++++++++++++++++++
send-test/metadata.json | 12 ++++++++++++
send-test/send-test.yaml | 19 +++++++++++++++++++
4 files changed, 71 insertions(+)
diff --git a/camel-jbang-example-catalog.json b/camel-jbang-example-catalog.json
index fca58c3..43b758e 100644
--- a/camel-jbang-example-catalog.json
+++ b/camel-jbang-example-catalog.json
@@ -369,6 +369,25 @@
"routes.camel.yaml"
]
},
+ {
+ "name": "send-test",
+ "title": "Send Message Test",
+ "description": "Test sending messages to a running integration via TUI
or CLI",
+ "level": "beginner",
+ "tags": [
+ "beginner",
+ "direct",
+ "send",
+ "tui"
+ ],
+ "bundled": true,
+ "requiresDocker": false,
+ "hasCitrusTests": false,
+ "files": [
+ "README.md",
+ "send-test.yaml"
+ ]
+ },
{
"name": "smart-log-analyzer",
"title": "Smart Log Analyzer",
diff --git a/send-test/README.md b/send-test/README.md
new file mode 100644
index 0000000..ded05ff
--- /dev/null
+++ b/send-test/README.md
@@ -0,0 +1,21 @@
+## Send Message Test
+
+This example has a `direct` route you can send messages to, and a `timer`
route that ticks in the background.
+
+Use this to test sending messages via the TUI (F2 -> Send Message) or the CLI
(`camel cmd send`).
+
+### How to run
+
+ camel run send-test.yaml
+
+### Send a message (CLI)
+
+ camel cmd send send-test --endpoint=direct:greet --body=World
+
+### Send a message (TUI)
+
+ camel tui
+
+Select the integration, press `F2`, choose `Send Message`, type a message
body, and press Enter.
+
+Toggle the mode to `InOut` to see the reply ("Hello World!").
diff --git a/send-test/metadata.json b/send-test/metadata.json
new file mode 100644
index 0000000..ec98556
--- /dev/null
+++ b/send-test/metadata.json
@@ -0,0 +1,12 @@
+{
+ "title": "Send Message Test",
+ "description": "Test sending messages to a running integration via TUI or
CLI",
+ "tags": [
+ "beginner",
+ "direct",
+ "send",
+ "tui"
+ ],
+ "bundled": true,
+ "level": "beginner"
+}
diff --git a/send-test/send-test.yaml b/send-test/send-test.yaml
new file mode 100644
index 0000000..91f9ded
--- /dev/null
+++ b/send-test/send-test.yaml
@@ -0,0 +1,19 @@
+- route:
+ id: greet
+ from:
+ uri: direct:greet
+ steps:
+ - log: "Received: ${body}"
+ - setBody:
+ simple: "Hello ${body}!"
+
+- route:
+ id: ticker
+ from:
+ uri: timer:tick
+ parameters:
+ period: 5000
+ steps:
+ - setBody:
+ simple: "Tick at ${date:now:HH:mm:ss}"
+ - log: "${body}"