[camel-examples] branch master updated: Polished tiny example

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel-examples] branch master updated: Polished tiny example

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

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-examples.git


The following commit(s) were added to refs/heads/master by this push:
     new 50e9993  Polished tiny example
50e9993 is described below

commit 50e999379385082abd49c04f1083334a4d5847f8
Author: Claus Ibsen <[hidden email]>
AuthorDate: Mon Feb 17 12:50:30 2020 +0100

    Polished tiny example
---
 .../src/main/java/org/apache/camel/example/MyRouteBuilder.java         | 2 --
 .../camel-example-main-tiny/src/main/resources/application.properties  | 3 +++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/examples/camel-example-main-tiny/src/main/java/org/apache/camel/example/MyRouteBuilder.java b/examples/camel-example-main-tiny/src/main/java/org/apache/camel/example/MyRouteBuilder.java
index e9c2b1c..26971ba 100644
--- a/examples/camel-example-main-tiny/src/main/java/org/apache/camel/example/MyRouteBuilder.java
+++ b/examples/camel-example-main-tiny/src/main/java/org/apache/camel/example/MyRouteBuilder.java
@@ -24,8 +24,6 @@ public class MyRouteBuilder extends RouteBuilder {
     public void configure() throws Exception {
         from("timer:foo?period={{myPeriod}}")
             .bean("myBean", "hello")
-            .log("${body}")
-            .bean("myBean", "bye")
             .log("${body}");
     }
 }
diff --git a/examples/camel-example-main-tiny/src/main/resources/application.properties b/examples/camel-example-main-tiny/src/main/resources/application.properties
index 7f12394..a9bf65b 100644
--- a/examples/camel-example-main-tiny/src/main/resources/application.properties
+++ b/examples/camel-example-main-tiny/src/main/resources/application.properties
@@ -20,6 +20,9 @@
 camel.main.name = MyCoolCamel
 camel.main.jmx-enabled = false
 
+# optimize to not allow adding new routes at runtime which reduces memory footprint with 10kb
+camel.main.allow-adding-new-routes = false
+
 # enable tracing
 ### camel.main.tracing = true