in cluster-leader-election/src/main/java/org/acme/master/CamelRoute.java [26:39]
public void configure() throws Exception {
// This route is configured to be local (see application.properties)
// so it will be started regardless of the leadership status of
// this node.
from("timer:heartbeat?period=10000")
.routeId("heartbeat")
.log("HeartBeating route (timer) {{node.id}} ...");
// This route is configured to be clustered so it will be started
// by the controller only when this node is leader
from("master:{{node.namespace}}:timer:clustered?period=5000")
.routeId("clustered")
.log("Clustered route (timer) {{node.id}} ...");
}