camel-quarkus icon indicating copy to clipboard operation
camel-quarkus copied to clipboard

ZooKeeper Master native support

Open ppalaga opened this issue 6 years ago • 1 comments

ppalaga avatar Aug 26 '20 09:08 ppalaga

Hello. I successfully built the Camel Zookeeper Master using this build step for my use case.

public class ZookeeperMasterNativeBuildStep {

    private static final String FEATURE = "camel-zookeeper-master-native";

    @BuildStep(onlyIf = { NativeBuild.class })
    FeatureBuildItem feature() {
        return new FeatureBuildItem(FEATURE);
    }

    @BuildStep(onlyIf = { NativeBuild.class })
    ReflectiveClassBuildItem registerForReflection() {
        return ReflectiveClassBuildItem.builder(
                        "org.apache.zookeeper.ClientCnxnSocketNIO",
                        "org.apache.zookeeper.ClientCnxnSocketNetty",
                        "org.apache.zookeeper.client.ZKClientConfig",
                        "org.apache.camel.component.zookeepermaster.CamelNodeState",
                        "org.apache.camel.component.zookeepermaster.group.NodeState",
                        "sun.security.provider.ConfigFile")
                .methods()
                .classes()
                .fields()
                .constructors()
                .unsafeAllocated()
                .serialization()
                .build();
    }

    @BuildStep(onlyIf = { NativeBuild.class })
    IndexDependencyBuildItem registerDependencyForIndex() {
        return new IndexDependencyBuildItem("org.apache.zookeeper", "zookeeper");
    }

}

raphael5178 avatar Jun 18 '26 17:06 raphael5178