You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2026/01/13 11:05:19 UTC
(camel-spring-boot) branch camel-spring-boot-4.14.x updated: Update file-cluster-service-starter configuration for recent FileLockClusterService enhancements
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch camel-spring-boot-4.14.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/camel-spring-boot-4.14.x by this push:
new 23a497b3049 Update file-cluster-service-starter configuration for recent FileLockClusterService enhancements
23a497b3049 is described below
commit 23a497b3049fee66c9f1a16299fb223c7180065a
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Jan 13 09:40:17 2026 +0000
Update file-cluster-service-starter configuration for recent FileLockClusterService enhancements
---
.../src/main/docs/file-cluster-service.json | 16 +++++++--
.../FileLockClusterServiceAutoConfiguration.java | 2 ++
.../FileLockClusterServiceConfiguration.java | 40 ++++++++++++++++++++--
3 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/components-starter/camel-file-cluster-service-starter/src/main/docs/file-cluster-service.json b/components-starter/camel-file-cluster-service-starter/src/main/docs/file-cluster-service.json
index 375e915b00f..cb127f57ffc 100644
--- a/components-starter/camel-file-cluster-service-starter/src/main/docs/file-cluster-service.json
+++ b/components-starter/camel-file-cluster-service-starter/src/main/docs/file-cluster-service.json
@@ -10,13 +10,13 @@
{
"name": "camel.cluster.file.acquire-lock-delay",
"type": "java.lang.String",
- "description": "The time to wait before starting to try to acquire lock.",
+ "description": "The time to wait before starting to try to acquire the cluster lock. Note that if FileLockClusterService determines no cluster members are running or cannot reliably determine the cluster state, the initial delay is computed from the acquireLockInterval.",
"sourceType": "org.apache.camel.component.file.springboot.cluster.FileLockClusterServiceConfiguration"
},
{
"name": "camel.cluster.file.acquire-lock-interval",
"type": "java.lang.String",
- "description": "The time to wait between attempts to try to acquire lock.",
+ "description": "The time to wait between attempts to try to acquire the cluster lock evaluated using wall-clock time. All cluster members must use the same value so leadership checks and leader liveness detection remain consistent.",
"sourceType": "org.apache.camel.component.file.springboot.cluster.FileLockClusterServiceConfiguration"
},
{
@@ -25,6 +25,18 @@
"description": "Custom service attributes.",
"sourceType": "org.apache.camel.component.file.springboot.cluster.FileLockClusterServiceConfiguration"
},
+ {
+ "name": "camel.cluster.file.cluster-data-task-max-attempts",
+ "type": "java.lang.Integer",
+ "description": "The number of times a cluster data task will run, counting both the first execution and subsequent retries in case of failure or timeout. <p> This can be useful when the cluster data root is on network based file storage, where I\/O operations may occasionally block for long or unpredictable periods.",
+ "sourceType": "org.apache.camel.component.file.springboot.cluster.FileLockClusterServiceConfiguration"
+ },
+ {
+ "name": "camel.cluster.file.cluster-data-task-timeout",
+ "type": "java.lang.Long",
+ "description": "The timeout for a cluster data task (reading or writing cluster data). <p> Timeouts are useful when the cluster data root is on network storage, where I\/O operations may occasionally block for long or unpredictable periods.",
+ "sourceType": "org.apache.camel.component.file.springboot.cluster.FileLockClusterServiceConfiguration"
+ },
{
"name": "camel.cluster.file.enabled",
"type": "java.lang.Boolean",
diff --git a/components-starter/camel-file-cluster-service-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceAutoConfiguration.java b/components-starter/camel-file-cluster-service-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceAutoConfiguration.java
index e725ac8f7a7..c7edcb008d2 100644
--- a/components-starter/camel-file-cluster-service-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceAutoConfiguration.java
+++ b/components-starter/camel-file-cluster-service-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceAutoConfiguration.java
@@ -55,6 +55,8 @@ public class FileLockClusterServiceAutoConfiguration {
Optional.ofNullable(configuration.getAcquireLockInterval()).map(TimePatternConverter::toMilliSeconds)
.ifPresent(v -> service.setAcquireLockInterval(v, TimeUnit.MILLISECONDS));
Optional.ofNullable(configuration.getHeartbeatTimeoutMultiplier()).ifPresent(service::setHeartbeatTimeoutMultiplier);
+ Optional.ofNullable(configuration.getClusterDataTaskMaxAttempts()).ifPresent(service::setClusterDataTaskMaxAttempts);
+ Optional.ofNullable(configuration.getClusterDataTaskTimeout()).ifPresent(service::setClusterDataTaskTimeout);
return service;
}
diff --git a/components-starter/camel-file-cluster-service-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceConfiguration.java b/components-starter/camel-file-cluster-service-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceConfiguration.java
index c87c6a9aaff..39b5b5ad71e 100644
--- a/components-starter/camel-file-cluster-service-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceConfiguration.java
+++ b/components-starter/camel-file-cluster-service-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceConfiguration.java
@@ -38,12 +38,15 @@ public class FileLockClusterServiceConfiguration {
private String root;
/**
- * The time to wait before starting to try to acquire lock.
+ * The time to wait before starting to try to acquire the cluster lock. Note that if FileLockClusterService
+ * determines no cluster members are running or cannot reliably determine the cluster state, the initial delay is
+ * computed from the acquireLockInterval.
*/
private String acquireLockDelay;
/**
- * The time to wait between attempts to try to acquire lock.
+ * The time to wait between attempts to try to acquire the cluster lock evaluated using wall-clock time. All cluster
+ * members must use the same value so leadership checks and leader liveness detection remain consistent.
*/
private String acquireLockInterval;
@@ -60,6 +63,23 @@ public class FileLockClusterServiceConfiguration {
*/
private Integer heartbeatTimeoutMultiplier;
+ /**
+ * The number of times a cluster data task will run, counting both the first execution and subsequent retries in
+ * case of failure or timeout.
+ * <p>
+ * This can be useful when the cluster data root is on network based file storage, where I/O operations may
+ * occasionally block for long or unpredictable periods.
+ */
+ private Integer clusterDataTaskMaxAttempts;
+
+ /**
+ * The timeout for a cluster data task (reading or writing cluster data).
+ * <p>
+ * Timeouts are useful when the cluster data root is on network storage, where I/O operations may occasionally block
+ * for long or unpredictable periods.
+ */
+ private Long clusterDataTaskTimeout;
+
/**
* Service lookup order/priority.
*/
@@ -128,4 +148,20 @@ public class FileLockClusterServiceConfiguration {
public void setHeartbeatTimeoutMultiplier(Integer heartbeatTimeoutMultiplier) {
this.heartbeatTimeoutMultiplier = heartbeatTimeoutMultiplier;
}
+
+ public Integer getClusterDataTaskMaxAttempts() {
+ return clusterDataTaskMaxAttempts;
+ }
+
+ public void setClusterDataTaskMaxAttempts(Integer clusterDataTaskMaxAttempts) {
+ this.clusterDataTaskMaxAttempts = clusterDataTaskMaxAttempts;
+ }
+
+ public Long getClusterDataTaskTimeout() {
+ return clusterDataTaskTimeout;
+ }
+
+ public void setClusterDataTaskTimeout(Long clusterDataTaskTimeout) {
+ this.clusterDataTaskTimeout = clusterDataTaskTimeout;
+ }
}