admin管理员组

文章数量:1318573

To upgrade java 17, camel 2 is not support anymore.

In camel migration guide .html,

The camel-zookeeper has its route policy functionality removed, instead use ZooKeeperClusterService or the camel-zookeeper-master component.

Therefore my karaf application with camel 2 ZooKeeperRoutePolicy is not work anymore. Here's my previous configuration in camel 2:

<blueprint ...>

  <!-- Zookeeper Policy -->
  <bean id="zookeeperPolicy" activation="eager" class=".apache.camelponent.zookeeper.policy.ZooKeeperRoutePolicy">
    <argument value="zookeeper:$(zookeeper.server)/tasks/xxx-interfaces" />
    <argument value="1" />
  </bean>
...
  <camelContext xmlns=";>
...
    <route id="route-xxx" streamCache="true" routePolicyRef="zookeeperPolicy">
      <from uri="file:/..." />
      <to uri="file:/..." />
    </route>

whether $(zookeeper.server) is AAA-BB-CCC1:2181,AAA-BB-CCC2:2181,AAA-BB-CCC3:2181

In camel clustering page .html, there is an example to setup:

  <bean id="zx" class=".apache.camelponent.zookeeper.cluster.ZooKeeperClusterService">
    <property name="id" value="node-1"/>
    <property name="basePath" value="/camel/cluster"/>
    <property name="nodes" value="localhost:2181"/>
  </bean>

  <camelContext xmlns="; autoStartup="false">
    ...
  </camelContext>

However, the most important part is dot dot dot (...). I have no idea on how to configure to use the ZooKeeperClusterService for my route in the camelContext.

How could it be setup so that it can have the same behavior with camel 2 ZooKeeperRoutePolicy?

本文标签: How to use camel 3 ZooKeeperClusterService to replace deprecated ZooKeeperRoutePolicyStack Overflow