You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/06/10 20:56:11 UTC
(camel) branch main updated (61167507fc0d -> 291314f7283d)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
from 61167507fc0d CAMEL-23727: camel-jbang - Add mouse scroll support for TUI shell panel (#23919)
new d58b016b2d78 Sync bundled examples
new 291314f7283d Add camel 1 tribute to bundled examples. Fix jbang cli rebrand maven doc updater
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../ROOT/pages/camel-jbang-configuration.adoc | 2 +-
dsl/camel-jbang/camel-jbang-core/pom.xml | 4 +
.../resources/examples/camel-1-tribute/README.md | 87 ++++++++++++++++++++++
.../camel-1-tribute/application.properties | 17 +++++
.../camel-1-tribute/jms-to-file.camel.yaml | 35 +++++++++
.../examples/camel-jbang-example-catalog.json | 24 ++++++
.../route-topology/route-topology.camel.yaml | 19 +++--
.../maven/packaging/PrepareCamelJBangDocMojo.java | 2 +-
8 files changed, 181 insertions(+), 9 deletions(-)
create mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/README.md
create mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/application.properties
create mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/jms-to-file.camel.yaml
(camel) 02/02: Add camel 1 tribute to bundled examples. Fix jbang cli rebrand maven doc updater
Posted by da...@apache.org.
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.git
commit 291314f7283de67d72f6bd8c526e4226b4bf4536
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jun 10 22:55:56 2026 +0200
Add camel 1 tribute to bundled examples. Fix jbang cli rebrand maven doc updater
---
.../ROOT/pages/camel-jbang-configuration.adoc | 2 +-
dsl/camel-jbang/camel-jbang-core/pom.xml | 4 +
.../resources/examples/camel-1-tribute/README.md | 87 ++++++++++++++++++++++
.../camel-1-tribute/application.properties | 17 +++++
.../camel-1-tribute/jms-to-file.camel.yaml | 35 +++++++++
.../maven/packaging/PrepareCamelJBangDocMojo.java | 2 +-
6 files changed, 145 insertions(+), 2 deletions(-)
diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang-configuration.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang-configuration.adoc
index 430cb5af1493..6ace19aaa0c0 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang-configuration.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang-configuration.adoc
@@ -3,7 +3,7 @@
This page covers configuring the Camel CLI — available options, configuration commands, and how to set up your environment.
// jbang options: START
-== Configuration Options
+=== Camel CLI configurations
The camel.jbang supports 48 options, which are listed below.
[width="100%",cols="2,5,^1,2",options="header"]
diff --git a/dsl/camel-jbang/camel-jbang-core/pom.xml b/dsl/camel-jbang/camel-jbang-core/pom.xml
index 41282cd5a789..b6fc08ddf075 100644
--- a/dsl/camel-jbang/camel-jbang-core/pom.xml
+++ b/dsl/camel-jbang/camel-jbang-core/pom.xml
@@ -290,6 +290,10 @@
usetimestamp="true"/>
</sequential>
</macrodef>
+ <!-- camel-1-trbute -->
+ <sync-example name="camel-1-tribute" file="README.md"/>
+ <sync-example name="camel-1-tribute" file="application.properties"/>
+ <sync-example name="camel-1-tribute" file="jms-to-file.camel.yaml"/>
<!-- circuit-breaker -->
<sync-example name="circuit-breaker" file="README.md"/>
<sync-example name="circuit-breaker" file="route.camel.yaml"/>
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/README.md b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/README.md
new file mode 100644
index 000000000000..f1c50b903d4a
--- /dev/null
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/README.md
@@ -0,0 +1,87 @@
+## Camel 1.0 Tribute - JMS to File
+
+A tribute to the very first Apache Camel example ever written.
+
+When Apache Camel 1.0 was released in June 2007, the project shipped with just two examples.
+The first and most iconic was `camel-example-jms-file` - a simple route that consumed messages
+from a JMS queue and saved them to the file system.
+
+Back then, Camel was still part of the Apache ActiveMQ project. The README was signed
+_"The Apache ActiveMQ team"_, the website lived at `activemq.apache.org/camel`,
+and classes like `CamelTemplate` (later renamed to `ProducerTemplate`) were brand new.
+
+The original example looked like this:
+
+```java
+CamelContext context = new DefaultCamelContext();
+
+ConnectionFactory connectionFactory =
+ new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
+context.addComponent("test-jms",
+ JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
+
+context.addRoutes(new RouteBuilder() {
+ public void configure() {
+ from("test-jms:queue:test.queue").to("file://test");
+ }
+});
+
+CamelTemplate template = new CamelTemplate(context);
+context.start();
+
+for (int i = 0; i < 10; i++) {
+ template.sendBody("test-jms:queue:test.queue", "Test Message: " + i);
+}
+```
+
+That was 40+ lines of Java, a Maven project, ActiveMQ embedded in-process,
+and manual component wiring.
+
+Today, the same example is a single YAML file and one command.
+
+### Running the example
+
+Start an Apache ActiveMQ Artemis broker:
+
+```sh
+$ camel infra run artemis
+```
+
+Or with Docker manually:
+
+```sh
+$ docker run --detach --name mycontainer -p 61616:61616 -p 8161:8161 --rm apache/activemq-artemis:latest-alpine
+```
+
+Then run the example:
+
+```sh
+$ camel run *
+```
+
+Camel will send 10 test messages to the `test.queue` JMS queue (just like the original)
+and consume them back, saving each message as a file in the `test` directory.
+
+### What changed in 19 years
+
+| | Camel 1.0 (2007) | Camel CLI (today) |
+|---|---|---|
+| **Language** | Java (40+ lines) | YAML (25 lines) |
+| **Build** | Maven project with pom.xml | No build needed |
+| **Broker** | Embedded ActiveMQ (in-process) | Apache ActiveMQ Artemis (container) |
+| **Component setup** | Manual `ConnectionFactory` wiring | Auto-configured via properties |
+| **Run command** | `mvn camel:run` | `camel run *` |
+| **Dependencies** | Declared in pom.xml | Auto-downloaded |
+
+What stayed the same: `from("jms:queue:test.queue").to("file://test")` - the core routing idea
+that made Camel what it is today.
+
+### Help and contributions
+
+If you hit any problem using Camel or have some feedback, then please
+[let us know](https://camel.apache.org/community/support/).
+
+We also love contributors, so
+[get involved](https://camel.apache.org/community/contributing/) :-)
+
+The Camel riders!
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/application.properties b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/application.properties
new file mode 100644
index 000000000000..79bbe7865c6f
--- /dev/null
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/application.properties
@@ -0,0 +1,17 @@
+# artemis connection factory
+camel.beans.artemisCF = #class:org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory
+# URL for broker
+camel.beans.artemisCF.brokerURL = tcp://localhost:61616
+
+# if broker requires specific login
+camel.beans.artemisCF.user = artemis
+camel.beans.artemisCF.password = artemis
+
+# pooled connection factory
+camel.beans.poolCF = #class:org.messaginghub.pooled.jms.JmsPoolConnectionFactory
+camel.beans.poolCF.connectionFactory = #bean:artemisCF
+camel.beans.poolCF.maxSessionsPerConnection = 500
+camel.beans.poolCF.connectionIdleTimeout = 20000
+
+# setup JMS component to use connection factory
+camel.component.jms.connection-factory = #bean:poolCF
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/jms-to-file.camel.yaml b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/jms-to-file.camel.yaml
new file mode 100644
index 000000000000..582d02526303
--- /dev/null
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-1-tribute/jms-to-file.camel.yaml
@@ -0,0 +1,35 @@
+- route:
+ id: jms-to-file
+ description: "Camel 1.0 tribute: consume from JMS queue and save to file"
+ from:
+ uri: jms
+ parameters:
+ destinationName: test.queue
+ steps:
+ - log:
+ message: "Received: ${body}"
+ - to:
+ uri: file
+ parameters:
+ directoryName: test
+
+- route:
+ id: send-test-messages
+ description: "Send 10 test messages to JMS queue (just like the original example)"
+ from:
+ uri: timer
+ parameters:
+ timerName: sender
+ repeatCount: 10
+ period: 1000
+ steps:
+ - setBody:
+ expression:
+ simple:
+ expression: "Test Message: ${exchangeProperty.CamelTimerCounter}"
+ - log:
+ message: "Sending: ${body}"
+ - to:
+ uri: jms
+ parameters:
+ destinationName: test.queue
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelJBangDocMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelJBangDocMojo.java
index 8f19da01cbd3..5dda587b2e8c 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelJBangDocMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareCamelJBangDocMojo.java
@@ -81,7 +81,7 @@ public class PrepareCamelJBangDocMojo extends AbstractGeneratorMojo {
return;
}
- File file = new File(docDocDir, "camel-jbang.adoc");
+ File file = new File(docDocDir, "camel-jbang-configuration.adoc");
boolean exists = file.exists();
boolean updated;
try {
(camel) 01/02: Sync bundled examples
Posted by da...@apache.org.
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.git
commit d58b016b2d7816646d82d8a6b00ae22017835300
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jun 10 22:47:26 2026 +0200
Sync bundled examples
---
.../examples/camel-jbang-example-catalog.json | 24 ++++++++++++++++++++++
.../route-topology/route-topology.camel.yaml | 19 ++++++++++-------
2 files changed, 36 insertions(+), 7 deletions(-)
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-jbang-example-catalog.json b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-jbang-example-catalog.json
index 1d5361fa33f6..8ffef5e7e9b1 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-jbang-example-catalog.json
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/camel-jbang-example-catalog.json
@@ -66,6 +66,30 @@
"http-to-aws-sqs.camel.yaml"
]
},
+ {
+ "name": "camel-1-tribute",
+ "title": "Camel 1.0 Tribute",
+ "description": "A tribute to the very first Apache Camel example from 2007 - JMS to File",
+ "level": "beginner",
+ "tags": [
+ "beginner",
+ "jms",
+ "file",
+ "artemis",
+ "tribute"
+ ],
+ "bundled": true,
+ "requiresDocker": false,
+ "hasCitrusTests": false,
+ "files": [
+ "README.md",
+ "application.properties",
+ "jms-to-file.camel.yaml"
+ ],
+ "infraServices": [
+ "artemis"
+ ]
+ },
{
"name": "circuit-breaker",
"title": "Circuit Breaker",
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/route-topology/route-topology.camel.yaml b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/route-topology/route-topology.camel.yaml
index b1338b96b462..bbe81fb3ccd9 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/route-topology/route-topology.camel.yaml
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/examples/route-topology/route-topology.camel.yaml
@@ -5,7 +5,7 @@
# Trigger: generates a new order every 5 seconds
- route:
id: order-generator
- description: Generate Orders
+ description: Generates a new order every 5 seconds
from:
uri: timer
parameters:
@@ -22,7 +22,7 @@
# HTTP entry point: receives orders from external clients
- route:
id: order-api
- description: Order REST API
+ description: Receives orders from external clients via HTTP
from:
uri: platform-http
parameters:
@@ -35,7 +35,7 @@
# Shared route: validates and publishes orders (used by both order-generator and order-api)
- route:
id: process-order
- description: Process Order
+ description: Validates and publishes orders to Kafka
from:
uri: direct:process-order
steps:
@@ -44,12 +44,13 @@
- log:
message: "Processing order: ${body}"
- to:
+ id: to-kafka-orders
uri: kafka:orders
# Validation: checks order contents
- route:
id: validate-order
- description: Validate Order
+ description: Checks order contents before processing
from:
uri: direct:validate-order
steps:
@@ -59,7 +60,7 @@
# Kafka consumer: picks up orders and fans out to fulfillment and notifications
- route:
id: order-dispatcher
- description: Dispatch Order
+ description: Fans out orders to fulfillment and notifications
from:
uri: kafka:orders
steps:
@@ -68,32 +69,36 @@
- multicast:
steps:
- to:
+ id: to-kafka-fulfillment
uri: kafka:fulfillment
- to:
+ id: to-kafka-notifications
uri: kafka:notifications
# Kafka consumer: handles fulfillment and reports to warehouse
- route:
id: fulfillment
- description: Fulfill Order
+ description: Handles order fulfillment and ships to warehouse
from:
uri: kafka:fulfillment
steps:
- log:
message: "Fulfilling order: ${body}"
- to:
+ id: to-kafka-warehouse-shipments
uri: kafka:warehouse-shipments
description: Ship to Warehouse
# Kafka consumer: sends notifications via external email service
- route:
id: notification
- description: Send Notification
+ description: Sends order notifications via email
from:
uri: kafka:notifications
steps:
- log:
message: "Sending notification for: ${body}"
- to:
+ id: to-kafka-email-outbox
uri: kafka:email-outbox
description: Send Email