This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 5bd5645da00 Camel 17515 (#7339)
5bd5645da00 is described below
commit 5bd5645da00a4a7e470731de97404de7f8baecb2
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Apr 4 12:33:30 2022 +0200
Camel 17515 (#7339)
CAMEL-17515: Camel should report DOWN for readiness check during graceful
shutdown (stopping camel context)
---
.../main/java/org/apache/camel/impl/health/ContextHealthCheck.java | 3 ++-
docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git
a/core/camel-health/src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java
b/core/camel-health/src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java
index 069da3fd18a..7e6b5f4cf69 100644
---
a/core/camel-health/src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java
+++
b/core/camel-health/src/main/java/org/apache/camel/impl/health/ContextHealthCheck.java
@@ -56,7 +56,8 @@ public final class ContextHealthCheck extends
AbstractHealthCheck {
if (getCamelContext().getStatus().isStarted()) {
builder.up();
- } else if (getCamelContext().getStatus().isStopped()) {
+ } else {
+ // not ready also during graceful shutdown
builder.down();
}
}
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc
b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc
index 3cf6a391c72..c5e958634f6 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_17.adoc
@@ -6,6 +6,11 @@ from both 3.0 to 3.1 and 3.1 to 3.2.
== Upgrading Camel 3.16 to 3.17
+=== camel-health
+
+Camel now reports DOWN when Camel is being stopped, during the graceful
shutdown process.
+This ensures that Camel reports that it's not ready to accept new traffic.
+
=== camel-main
Added method `findRouteResourcesFromDirectory` to
`org.apache.camel.main.RoutesCollector`.