首页 > 解决方案 > 集群 - FileLockClusterService 使用

问题描述

我正在尝试使用文件锁(活动/备用节点)方法使用 Camel Clustering。根据文档(https://camel.apache.org/manual/latest/clustering.html),在 Spring Boot 配置文件中,我们可以定义集群详细信息,如下所示。我遇到的问题是,我不知道需要添加哪个 Maven 依赖项才能配置以下属性。

camel.component.file.cluster.service.enabled = true
camel.component.file.cluster.service.id = ${random.uuid}
camel.component.file.cluster.service.root = ${java.io.tmpdir}

我的 IDE 无法识别任何此类属性。 在此处输入图像描述

pom.xml

....
<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-master-starter</artifactId>
</dependency>

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-file-starter</artifactId>
</dependency>

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-spring-boot-starter</artifactId>
</dependency>
 
....
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.apache.camel.springboot</groupId>
            <artifactId>camel-spring-boot-dependencies</artifactId>
            <version>3.4.0</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>
....

春季启动版本:2.2.5.RELEASE

任何指针都会有所帮助。

标签: spring-bootapache-camelspring-camel

解决方案


推荐阅读