Skip to content

Commit c51db5b

Browse files
committed
CAMEL-16861: Update docs
1 parent 048fc08 commit c51db5b

4 files changed

Lines changed: 139 additions & 72 deletions

File tree

docs/user-manual/modules/ROOT/pages/getting-started.adoc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ And some more alternative methods:
1313
- Using Maven Archetypes
1414
- Cloning an existing example to modify
1515
16-
1716
== Using online Project generators
1817

1918
You can use https://start.spring.io/[Spring Boot Initializer] which is the Spring Boot
@@ -36,7 +35,7 @@ Once JBang is installed, you should be able to make sure it works by calling the
3635
[source,bash]
3736
----
3837
$ jbang version
39-
0.132.1
38+
0.137.0
4039
----
4140

4241
After this then install Camel into JBang as follows:
@@ -51,8 +50,8 @@ Then you can check that Camel is installed and working by executing:
5150
[source,bash]
5251
----
5352
$ camel version
54-
JBang version: 0.132.1
55-
Camel JBang version: 4.16.0
53+
JBang version: 0.137.0
54+
Camel JBang version: 4.18.0
5655
----
5756

5857
*Step 2*
@@ -96,6 +95,7 @@ Make sure to check out the xref:camel-jbang.adoc[Camel JBang] documentation, for
9695
of the Camel CLI. You will also find information how you can _export_ what you have built
9796
with the Camel CLI into a vanilla Camel Spring Boot or Camel Quarkus project.
9897

98+
9999
== Alternative ways of getting started with Camel
100100

101101
=== Adding Camel to an existing project
@@ -118,6 +118,8 @@ Among others the following are open source and provide support for official Apac
118118
- https://github.com/apache/camel-karavan[Apache Camel Karavan] - Has an https://karavan.space/[online UI designer] that runs in a web browser.
119119
- https://kaoto.io/[Kaoto] - Has also an https://kaotoio.github.io/kaoto/[online UI designer] that runs in a web browser.
120120

121+
Both Camel Karavan and Kaoto can be installed as Visual Studio plugins directly in this IDE.
122+
121123
=== Using Maven Archetypes
122124

123125
Apache Camel comes with a set of xref:camel-maven-archetypes.adoc[Camel Maven Archetypes],
@@ -128,3 +130,8 @@ you can use to create a new Camel project.
128130
There are tons of Camel examples hosted on GitHub that you can clone and modify,
129131
such as https://github.com/apache/camel-spring-boot-examples[Camel Spring Boot examples].
130132

133+
== See Also
134+
135+
To get familiar and learn the basic concepts of Apache Camel, then its recommend to check out xref:architecture.adoc[Architecture]
136+
and follow the links from that page.
137+

docs/user-manual/modules/ROOT/pages/graceful-shutdown.adoc

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
= Graceful Shutdown
22

33
Camel supports a pluggable shutdown strategy using
4-
`org.apache.camel.spi.ShutdownStrategy`. Its responsible for shutting
4+
`org.apache.camel.spi.ShutdownStrategy`. It's responsible for shutting
55
down routes in a graceful manner. The other resources will still be
6-
handled by xref:camelcontext.adoc[CamelContext] to shutdown. This leaves
6+
handled by xref:camelcontext.adoc[CamelContext] to shut down. This leaves
77
the problem at hand with properly shutting down all the routes reliably
88
to the `ShutdownStrategy`.
99

@@ -13,12 +13,11 @@ doing that.
1313

1414
== Default Shutdown Strategy
1515

16-
The default strategy (`DefaultShutdownStrategy`) will gracefully shutdown routes:
16+
The default strategy (`DefaultShutdownStrategy`) will gracefully shut down routes:
1717

1818
* in the reverse order they were started
19-
* let pending and current in flight exchanges run to completion before
20-
shutting down
21-
* using a timeout of 45 seconds which then forces a _hard_ shutdown
19+
* let pending and current in flight exchanges run to completion before shutting down
20+
* using a timeout of 45 seconds (can be configured) which then forces a _hard_ shutdown
2221

2322
The settings are configurable, so you can change the timeout, and
2423
whether in case of timeout to force a _hard_ shutdown or ignore.
@@ -40,24 +39,40 @@ When shutting down the strategy will output to log the progress:
4039
---------------------------------
4140

4241
Notice how the strategy waits while there are inflight exchanges still being
43-
processed before it shutdown the routes and after that Camel itself.
42+
processed before it shut down the routes and after that Camel itself.
4443

4544
=== Suppressing logging due to timeout not allowing all inflight messages to complete
4645

4746
If a graceful shutdown could not shutdown cleanly within the given
4847
timeout period, then Camel performs a more aggressive shutdown (hard) by
4948
forcing routes and thread pools etc to shut down, and the routing
50-
engine will reject continue processing xref:exchange.adoc[Exchange]s. If
51-
this happens you may see WARN logs about xref:exchange.adoc[Exchange]s
49+
engine will reject continue processing xref:exchange.adoc[Exchange](s). If
50+
this happens you may see WARN logs about xref:exchange.adoc[Exchange](s)
5251
being rejected and other failures due the forced shutdown.
5352

5453
If you do not want to see these logs, you can suppress this by setting
55-
the option suppressLoggingOnTimeout to true.
54+
the option `suppressLoggingOnTimeout` to true.
5655

56+
57+
[tabs]
58+
====
59+
60+
Java::
61+
+
5762
[source,java]
58-
---------------------------------
63+
----
5964
context.getShutdownStrategy().setSuppressLoggingOnTimeout(true);
60-
---------------------------------
65+
----
66+
67+
Application Properties::
68+
+
69+
Or in `application.properties`:
70+
+
71+
[source,properties]
72+
----
73+
camel.main.shutdownSuppressLoggingOnTimeout = true
74+
----
75+
====
6176

6277
Notice that suppression is _a best effort_ attempt and there may still be some
6378
logging from 3rd party libraries, which Camel cannot control.
@@ -66,7 +81,7 @@ logging from 3rd party libraries, which Camel cannot control.
6681

6782
If a graceful shutdown could not shutdown cleanly within the given
6883
timeout period, then Camel performs a more aggressive shutdown by
69-
forcing routes and thread pools etc to shut down. When the timeout
84+
forcing routes and thread pools etc. to shut down. When the timeout
7085
happens, then Camel logs information about the current inflight
7186
exchanges, which shows from which route the exchange origins, and where
7287
it currently is being routed. For example the logging below, shows that
@@ -91,11 +106,26 @@ duration=2017]
91106
If you do not want to see these logs, you can turn this off by setting
92107
the option logInflightExchangesOnTimeout to false.
93108

109+
[tabs]
110+
====
111+
112+
Java::
113+
+
94114
[source,java]
95115
---------------------------------
96116
context.getShutdownStrategy().setLogInflightExchangesOnTimeout(false);
97117
---------------------------------
98118
119+
Application Properties::
120+
+
121+
Or in `application.properties`:
122+
+
123+
[source,properties]
124+
----
125+
camel.main.logInflightExchangesOnTimeout = false
126+
----
127+
====
128+
99129
=== JMX managed
100130

101131
The `ShutdownStrategy` is JMX aware, so you can manage it from a
@@ -161,7 +191,7 @@ It is possible to stop (will do a gracefully shut down) an individual route usin
161191
camelContext.getRouteController().stopRoute(routeId);
162192
----
163193

164-
Routes can also be stopped via JMX.
194+
TIP: Routes can also be stopped via JMX or external tools such as https://hawt.io/[Hawtio].
165195

166196
=== Stopping and marking routes as failed due to an exception
167197

@@ -180,7 +210,7 @@ NOTE: The Camel xref:health-check.adoc[Health Check] detect the route as failed
180210
If the route is manually stopped, then the route is not marked as failed,
181211
and the xref:health-check.adoc[Health Check] will report the status as UNKNOWN.
182212

183-
Routes can also be stopped and failed via JMX.
213+
TIP: Routes can also be stopped and failed via JMX or external tools such as https://hawt.io/[Hawtio].
184214

185215
== Implementing custom component or ShutdownStrategy
186216

@@ -196,7 +226,7 @@ on the `CamelContext` using the `setShutdownStrategy` method.
196226
=== ShutdownAware
197227

198228
The interface `org.apache.camel.spi.ShutdownAware` is an optional
199-
interface consumers can implement to have fine grained control during
229+
interface consumers can implement to have fine-grained control during
200230
shutdown. The `ShutdownStrategy` must be able to deal with consumers
201231
which implement this interface. This interface was introduced to cater
202232
for in memory consumers such as xref:components::seda-component.adoc[SEDA] which potentially

0 commit comments

Comments
 (0)