Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.33 KB

README.adoc

File metadata and controls

49 lines (32 loc) · 1.33 KB

Camel Example Main Health

This example shows how to use Camel health-check in standalone mode. The example shows how you can build custom health-checks and have them automatic discovered by Camel and used as parts of its health-check system.

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 route’s 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 via JMX.

Build

First compile the example by executing:

$ mvn compile

How to run

You can run this example using

$ mvn camel:run

JMX Management

You can see from JMX the health-check status in the Camel tree under health and find the DefaultHealthCheck MBean.

Help and contributions

If you hit any problem using Camel or have some feedback, then please let us know.

We also love contributors, so get involved :-)

The Camel riders!