This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new 4432a7e716 Move file-cluster-service config options to 
ConfigPhase.RUN_TIME
4432a7e716 is described below

commit 4432a7e71673a52272d8d3b138673483ae8f62f8
Author: James Netherton <[email protected]>
AuthorDate: Mon Mar 9 12:57:46 2026 +0000

    Move file-cluster-service config options to ConfigPhase.RUN_TIME
    
    Fixes #8391
---
 .../reference/extensions/file-cluster-service.adoc | 18 ++++----
 .../FileLockClusterServiceProcessor.java           | 15 +++----
 .../FileLockClusterServiceBuildTimeConfig.java     | 52 ++++++++++++++++++++++
 .../cluster/FileLockClusterServiceRecorder.java    |  9 +++-
 ...va => FileLockClusterServiceRuntimeConfig.java} | 30 +++----------
 5 files changed, 81 insertions(+), 43 deletions(-)

diff --git 
a/docs/modules/ROOT/pages/reference/extensions/file-cluster-service.adoc 
b/docs/modules/ROOT/pages/reference/extensions/file-cluster-service.adoc
index bdf8443efa..19a200f8c9 100644
--- a/docs/modules/ROOT/pages/reference/extensions/file-cluster-service.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/file-cluster-service.adoc
@@ -73,31 +73,31 @@ The file cluster service could further be tuned by tweaking 
`quarkus.camel.clust
 | Configuration property | Type | Default
 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-id]]`link:#quarkus-camel-cluster-file-id[quarkus.camel.cluster.file.id]`
+a| 
[[quarkus-camel-cluster-file-id]]`link:#quarkus-camel-cluster-file-id[quarkus.camel.cluster.file.id]`
 
 The cluster service ID (defaults to null).
 | `string`
 | 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-root]]`link:#quarkus-camel-cluster-file-root[quarkus.camel.cluster.file.root]`
+a| 
[[quarkus-camel-cluster-file-root]]`link:#quarkus-camel-cluster-file-root[quarkus.camel.cluster.file.root]`
 
 The root path (defaults to null).
 | `string`
 | 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-order]]`link:#quarkus-camel-cluster-file-order[quarkus.camel.cluster.file.order]`
+a| 
[[quarkus-camel-cluster-file-order]]`link:#quarkus-camel-cluster-file-order[quarkus.camel.cluster.file.order]`
 
 The service lookup order/priority (defaults to 2147482647).
 | `int`
 | 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-attributes-attributes]]`link:#quarkus-camel-cluster-file-attributes-attributes[quarkus.camel.cluster.file.attributes."attributes"]`
+a| 
[[quarkus-camel-cluster-file-attributes-attributes]]`link:#quarkus-camel-cluster-file-attributes-attributes[quarkus.camel.cluster.file.attributes."attributes"]`
 
 The custom attributes associated to the service (defaults to empty map).
 | `Map<String,String>`
 | 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-acquire-lock-delay]]`link:#quarkus-camel-cluster-file-acquire-lock-delay[quarkus.camel.cluster.file.acquire-lock-delay]`
+a| 
[[quarkus-camel-cluster-file-acquire-lock-delay]]`link:#quarkus-camel-cluster-file-acquire-lock-delay[quarkus.camel.cluster.file.acquire-lock-delay]`
 
 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
@@ -105,7 +105,7 @@ acquireLockInterval (defaults to 1000ms).
 | `string`
 | 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-acquire-lock-interval]]`link:#quarkus-camel-cluster-file-acquire-lock-interval[quarkus.camel.cluster.file.acquire-lock-interval]`
+a| 
[[quarkus-camel-cluster-file-acquire-lock-interval]]`link:#quarkus-camel-cluster-file-acquire-lock-interval[quarkus.camel.cluster.file.acquire-lock-interval]`
 
 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 (defaults to
@@ -113,7 +113,7 @@ members must use the same value so leadership checks and 
leader liveness detecti
 | `string`
 | 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-heartbeat-timeout-multiplier]]`link:#quarkus-camel-cluster-file-heartbeat-timeout-multiplier[quarkus.camel.cluster.file.heartbeat-timeout-multiplier]`
+a| 
[[quarkus-camel-cluster-file-heartbeat-timeout-multiplier]]`link:#quarkus-camel-cluster-file-heartbeat-timeout-multiplier[quarkus.camel.cluster.file.heartbeat-timeout-multiplier]`
 
 Multiplier applied to the cluster leader `acquireLockInterval` to determine 
how long followers should wait
 before considering the leader "stale".
@@ -123,7 +123,7 @@ followers will tolerate up to `2s * 3 = 6s` of silence 
before declaring the lead
 | `int`
 | 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-cluster-data-task-max-attempts]]`link:#quarkus-camel-cluster-file-cluster-data-task-max-attempts[quarkus.camel.cluster.file.cluster-data-task-max-attempts]`
+a| 
[[quarkus-camel-cluster-file-cluster-data-task-max-attempts]]`link:#quarkus-camel-cluster-file-cluster-data-task-max-attempts[quarkus.camel.cluster.file.cluster-data-task-max-attempts]`
 
 Sets how many times a cluster data task will run, counting both the first 
execution and subsequent retries in
 case of failure or timeout. The default is 5 attempts.
@@ -133,7 +133,7 @@ occasionally block for long or unpredictable periods.
 | `int`
 | 
 
-a|icon:lock[title=Fixed at build time] 
[[quarkus-camel-cluster-file-cluster-data-task-timeout]]`link:#quarkus-camel-cluster-file-cluster-data-task-timeout[quarkus.camel.cluster.file.cluster-data-task-timeout]`
+a| 
[[quarkus-camel-cluster-file-cluster-data-task-timeout]]`link:#quarkus-camel-cluster-file-cluster-data-task-timeout[quarkus.camel.cluster.file.cluster-data-task-timeout]`
 
 Sets the timeout for a cluster data task (reading or writing cluster data). 
The default is 10 seconds.
 
diff --git 
a/extensions/file-cluster-service/deployment/src/main/java/org/apache/camel/quarkus/component/file/cluster/deployment/FileLockClusterServiceProcessor.java
 
b/extensions/file-cluster-service/deployment/src/main/java/org/apache/camel/quarkus/component/file/cluster/deployment/FileLockClusterServiceProcessor.java
index 36793289ed..c157892859 100644
--- 
a/extensions/file-cluster-service/deployment/src/main/java/org/apache/camel/quarkus/component/file/cluster/deployment/FileLockClusterServiceProcessor.java
+++ 
b/extensions/file-cluster-service/deployment/src/main/java/org/apache/camel/quarkus/component/file/cluster/deployment/FileLockClusterServiceProcessor.java
@@ -22,20 +22,19 @@ import io.quarkus.deployment.annotations.ExecutionTime;
 import io.quarkus.deployment.annotations.Record;
 import io.quarkus.runtime.RuntimeValue;
 import org.apache.camel.component.file.cluster.FileLockClusterService;
-import 
org.apache.camel.quarkus.component.file.cluster.FileLockClusterServiceConfig;
+import 
org.apache.camel.quarkus.component.file.cluster.FileLockClusterServiceBuildTimeConfig;
 import 
org.apache.camel.quarkus.component.file.cluster.FileLockClusterServiceRecorder;
-import org.apache.camel.quarkus.core.deployment.spi.CamelBeanBuildItem;
 import org.apache.camel.quarkus.core.deployment.spi.CamelContextBuildItem;
+import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem;
 
 class FileLockClusterServiceProcessor {
 
-    @Record(ExecutionTime.STATIC_INIT)
-    @BuildStep(onlyIf = FileLockClusterServiceConfig.Enabled.class)
+    @BuildStep(onlyIf = FileLockClusterServiceBuildTimeConfig.Enabled.class)
+    @Record(ExecutionTime.RUNTIME_INIT)
     @Consume(CamelContextBuildItem.class)
-    CamelBeanBuildItem 
setupFileLockClusterService(FileLockClusterServiceConfig config,
-            FileLockClusterServiceRecorder recorder) {
+    CamelRuntimeBeanBuildItem 
setupFileLockClusterService(FileLockClusterServiceRecorder recorder) {
 
-        final RuntimeValue<FileLockClusterService> flcs = 
recorder.createFileLockClusterService(config);
-        return new CamelBeanBuildItem("fileLockClusterService", 
FileLockClusterService.class.getName(), flcs);
+        final RuntimeValue<FileLockClusterService> flcs = 
recorder.createFileLockClusterService();
+        return new CamelRuntimeBeanBuildItem("fileLockClusterService", 
FileLockClusterService.class.getName(), flcs);
     }
 }
diff --git 
a/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceBuildTimeConfig.java
 
b/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceBuildTimeConfig.java
new file mode 100644
index 0000000000..814db8fffd
--- /dev/null
+++ 
b/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceBuildTimeConfig.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.file.cluster;
+
+import java.util.function.BooleanSupplier;
+
+import io.quarkus.runtime.annotations.ConfigPhase;
+import io.quarkus.runtime.annotations.ConfigRoot;
+import io.smallrye.config.ConfigMapping;
+import io.smallrye.config.WithDefault;
+
+/**
+ * Build time configuration options for File Lock Cluster Service.
+ */
+@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
+@ConfigMapping(prefix = "quarkus.camel.cluster.file")
+public interface FileLockClusterServiceBuildTimeConfig {
+    /**
+     * Whether a File Lock Cluster Service should be automatically configured 
according to
+     * 'quarkus.camel.cluster.file.++*++' configurations.
+     *
+     * @deprecated  this property is no longer needed as the FileLock 
implementation of the Camel CLuster Service API has
+     *              been moved to a dedicated extension.
+     * @asciidoclet
+     */
+    @Deprecated(since = "3.10.0", forRemoval = true)
+    @WithDefault("true")
+    boolean enabled();
+
+    final class Enabled implements BooleanSupplier {
+        FileLockClusterServiceBuildTimeConfig config;
+
+        @Override
+        public boolean getAsBoolean() {
+            return config.enabled();
+        }
+    }
+}
diff --git 
a/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceRecorder.java
 
b/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceRecorder.java
index 69e2b2f39a..8651c2e40e 100644
--- 
a/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceRecorder.java
+++ 
b/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceRecorder.java
@@ -25,8 +25,15 @@ import 
org.apache.camel.component.file.cluster.FileLockClusterService;
 
 @Recorder
 public class FileLockClusterServiceRecorder {
-    public RuntimeValue<FileLockClusterService> 
createFileLockClusterService(FileLockClusterServiceConfig config) {
+    private final RuntimeValue<FileLockClusterServiceRuntimeConfig> config;
+
+    public 
FileLockClusterServiceRecorder(RuntimeValue<FileLockClusterServiceRuntimeConfig>
 config) {
+        this.config = config;
+    }
+
+    public RuntimeValue<FileLockClusterService> createFileLockClusterService() 
{
         FileLockClusterService flcs = new FileLockClusterService();
+        FileLockClusterServiceRuntimeConfig config = this.config.getValue();
 
         config.id().ifPresent(flcs::setId);
         config.root().ifPresent(flcs::setRoot);
diff --git 
a/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceConfig.java
 
b/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceRuntimeConfig.java
similarity index 80%
rename from 
extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceConfig.java
rename to 
extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceRuntimeConfig.java
index 6fb87babcd..8b5ddcf41e 100644
--- 
a/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceConfig.java
+++ 
b/extensions/file-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/file/cluster/FileLockClusterServiceRuntimeConfig.java
@@ -18,28 +18,17 @@ package org.apache.camel.quarkus.component.file.cluster;
 
 import java.util.Map;
 import java.util.Optional;
-import java.util.function.BooleanSupplier;
 
 import io.quarkus.runtime.annotations.ConfigPhase;
 import io.quarkus.runtime.annotations.ConfigRoot;
 import io.smallrye.config.ConfigMapping;
-import io.smallrye.config.WithDefault;
 
-@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
+/**
+ * Runtime configuration options for File Lock Cluster Service.
+ */
+@ConfigRoot(phase = ConfigPhase.RUN_TIME)
 @ConfigMapping(prefix = "quarkus.camel.cluster.file")
-public interface FileLockClusterServiceConfig {
-    /**
-     * Whether a File Lock Cluster Service should be automatically configured 
according to
-     * 'quarkus.camel.cluster.file.++*++' configurations.
-     *
-     * @deprecated  this property is no longer needed as the FileLock 
implementation of the Camel CLuster Service API has
-     *              been moved to a dedicated extension.
-     * @asciidoclet
-     */
-    @Deprecated(since = "3.10.0", forRemoval = true)
-    @WithDefault("true")
-    boolean enabled();
-
+public interface FileLockClusterServiceRuntimeConfig {
     /**
      * The cluster service ID (defaults to null).
      *
@@ -117,13 +106,4 @@ public interface FileLockClusterServiceConfig {
      * @asciidoclet
      */
     Optional<String> clusterDataTaskTimeout();
-
-    final class Enabled implements BooleanSupplier {
-        FileLockClusterServiceConfig config;
-
-        @Override
-        public boolean getAsBoolean() {
-            return config.enabled();
-        }
-    }
 }

Reply via email to