Repository: camel Updated Branches: refs/heads/master 45f364651 -> 71cc7be5f
CAMEL-11829: [example] spring-boot-health-checks - 'application' keep emitting ERRORs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/71cc7be5 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/71cc7be5 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/71cc7be5 Branch: refs/heads/master Commit: 71cc7be5f96abfef26c6a6acace42e9369c51fe3 Parents: 45f3646 Author: lburgazzoli <lburgazz...@gmail.com> Authored: Wed Sep 27 17:43:07 2017 +0200 Committer: lburgazzoli <lburgazz...@gmail.com> Committed: Wed Sep 27 17:43:07 2017 +0200 ---------------------------------------------------------------------- .../java/sample/camel/ApplicationConfiguration.java | 13 ++++++------- .../readme.adoc | 2 ++ 2 files changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/71cc7be5/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java ---------------------------------------------------------------------- diff --git a/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java b/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java index 45bfafd..75dd470 100644 --- a/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java +++ b/examples/camel-example-spring-boot-health-checks/application/src/main/java/sample/camel/ApplicationConfiguration.java @@ -29,18 +29,18 @@ public class ApplicationConfiguration { public void configure() throws Exception { from("timer:foo?period=1s") .routeId("foo") - .process(e -> { - throw new RuntimeCamelException("fail (foo)"); + .process(e -> { + throw new RuntimeCamelException("This is a forced exception to have health check monitor this failure (route=foo)"); }); from("timer:bar?period=1s") .routeId("bar") - .process(e -> { - throw new RuntimeCamelException("fail (bar)"); + .process(e -> { + throw new RuntimeCamelException("This is a forced exception to have health check monitor this failure (route=bar)"); }); from("timer:slow?period=1s") .routeId("slow") - .process(e -> { - Thread.sleep(1200); + .process(e -> { + Thread.sleep(1200); }); } }; @@ -56,4 +56,3 @@ public class ApplicationConfiguration { return new ApplicationCheck("local", "my-check-2"); } } - http://git-wip-us.apache.org/repos/asf/camel/blob/71cc7be5/examples/camel-example-spring-boot-health-checks/readme.adoc ---------------------------------------------------------------------- diff --git a/examples/camel-example-spring-boot-health-checks/readme.adoc b/examples/camel-example-spring-boot-health-checks/readme.adoc index e6651f2..658bd38 100644 --- a/examples/camel-example-spring-boot-health-checks/readme.adoc +++ b/examples/camel-example-spring-boot-health-checks/readme.adoc @@ -2,6 +2,8 @@ This example shows how to work with a simple Apache Camel application using Spring Boot. +NOTE: Some of the routes fail intentionally to have health check monitor their failures + ## How to run * mvn clean package