This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 946649c8 CAMEL-18125: fix not setting a cache for the clustering
example
946649c8 is described below
commit 946649c8a4781efa22882183a4c5e50171ba0d1d
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Tue Jun 21 13:59:17 2022 +0200
CAMEL-18125: fix not setting a cache for the clustering example
---
.../clusterized/strategies/ClusterizedLargeDirectoryRouteBuilder.java | 3 +++
1 file changed, 3 insertions(+)
diff --git
a/examples/resume-api/resume-api-fileset-clusterized/src/main/java/org/apache/camel/example/resume/fileset/clusterized/strategies/ClusterizedLargeDirectoryRouteBuilder.java
b/examples/resume-api/resume-api-fileset-clusterized/src/main/java/org/apache/camel/example/resume/fileset/clusterized/strategies/ClusterizedLargeDirectoryRouteBuilder.java
index 197b8e48..2692681a 100644
---
a/examples/resume-api/resume-api-fileset-clusterized/src/main/java/org/apache/camel/example/resume/fileset/clusterized/strategies/ClusterizedLargeDirectoryRouteBuilder.java
+++
b/examples/resume-api/resume-api-fileset-clusterized/src/main/java/org/apache/camel/example/resume/fileset/clusterized/strategies/ClusterizedLargeDirectoryRouteBuilder.java
@@ -21,6 +21,7 @@ import java.io.File;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.caffeine.resume.CaffeineCache;
import org.apache.camel.support.resume.Resumables;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -45,6 +46,8 @@ public class ClusterizedLargeDirectoryRouteBuilder extends
RouteBuilder {
* Let's configure the Camel routing rules using Java code...
*/
public void configure() {
+ getCamelContext().getRegistry().bind("resumeCache", new
CaffeineCache<>(10000));
+
from("timer:heartbeat?period=10000")
.routeId("heartbeat")
.log("HeartBeat route (timer) ...");