You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2020/08/03 09:28:23 UTC
[camel-quarkus] 02/02: Fixes health example #1500
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit b40ee79fa330377ea1f28ac593087e224803ec4e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jul 31 10:20:40 2020 +0200
Fixes health example #1500
---
examples/health/README.adoc | 6 ------
examples/health/pom.xml | 4 ----
examples/health/src/main/java/org/acme/health/MyRouteBuilder.java | 5 -----
examples/health/src/main/resources/application.properties | 5 -----
4 files changed, 20 deletions(-)
diff --git a/examples/health/README.adoc b/examples/health/README.adoc
index 964c972..819a406 100644
--- a/examples/health/README.adoc
+++ b/examples/health/README.adoc
@@ -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
diff --git a/examples/health/pom.xml b/examples/health/pom.xml
index 52be628..f51790a 100644
--- a/examples/health/pom.xml
+++ b/examples/health/pom.xml
@@ -57,10 +57,6 @@
</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>
</dependency>
<dependency>
diff --git a/examples/health/src/main/java/org/acme/health/MyRouteBuilder.java b/examples/health/src/main/java/org/acme/health/MyRouteBuilder.java
index 88288db..6615ad7 100644
--- a/examples/health/src/main/java/org/acme/health/MyRouteBuilder.java
+++ b/examples/health/src/main/java/org/acme/health/MyRouteBuilder.java
@@ -33,10 +33,5 @@ public class MyRouteBuilder extends RouteBuilder {
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");
}
}
diff --git a/examples/health/src/main/resources/application.properties b/examples/health/src/main/resources/application.properties
index f6ab0d7..6bd1962 100644
--- a/examples/health/src/main/resources/application.properties
+++ b/examples/health/src/main/resources/application.properties
@@ -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)