Skip to content

Commit

Permalink
Fixes health example #1500
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus authored and github-actions[bot] committed Aug 10, 2020
1 parent 61760ce commit 9efdccd
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
6 changes: 0 additions & 6 deletions examples/health/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ and other general information.
The example has two routes, a timer that calls a bean that flips a boolean that
causes the custom health check to be in either UP or DOWN state.

The 2nd route is on purpose made to fail on startup by configuring netty to an unknown host.
Camel supervising route controller will attempt to restart the route up till 10 times before exhausting.

The routes health check will therefore report this route as DOWN until its exhausted
where the states are changed to UNKNOWN.

The details can be seen at runtime from the calling the following url from a web browser: http://localhost:8080/health

=== Start in the Development mode
Expand Down
4 changes: 0 additions & 4 deletions examples/health/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-log</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-netty</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-timer</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,5 @@ public void configure() throws Exception {
from("timer:foo?period={{myPeriod}}").routeId("timer")
.bean(monkey, "chaos")
.log("${body}");

// this route is invalid and fails during startup
// the supervising route controller will take over and attempt
// to restart this route
from("netty:tcp:unknownhost").to("log:dummy").routeId("netty");
}
}
5 changes: 0 additions & 5 deletions examples/health/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,10 @@ camel.health.registry-enabled = true
# you can turn on or off individual routes as shown below
### camel.heath.config[timer].parent = routes
### camel.heath.config[timer].enabled = true
### camel.heath.config[netty].check = routes
### camel.heath.config[netty].enabled = false

# and configure each individually
camel.health.config[timer].parent = routes
camel.health.config[timer].interval = 5s
camel.health.config[netty].parent = routes
camel.health.config[netty].interval = 20s
camel.health.config[netty].failure-threshold = 10

# find grained routes configuration per route (support wildcards)
# (enabled is default true for discovered health-checks)
Expand Down

0 comments on commit 9efdccd

Please sign in to comment.