Skip to content

Commit

Permalink
CAMEL-11829: [example] spring-boot-health-checks - 'application' keep…
Browse files Browse the repository at this point in the history
… emitting ERRORs
  • Loading branch information
lburgazzoli committed Sep 27, 2017
1 parent 45f3646 commit 71cc7be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ public RouteBuilder routesBuilder() {
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);
});
}
};
Expand All @@ -56,4 +56,3 @@ public ApplicationCheck applicationHealth2() {
return new ApplicationCheck("local", "my-check-2");
}
}

2 changes: 2 additions & 0 deletions examples/camel-example-spring-boot-health-checks/readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71cc7be

Please sign in to comment.