vert.xquarkusvertx-eventbus

How to change quarkus-vertx eventBus ClusterManager options


I want to configure vertx at k8s by using hazelcast-kubernetes in Quarkus.

I need configure event-bus like this:

Config config = new Config();
config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);
            config.getNetworkConfig().getJoin().getKubernetesConfig().setEnabled(true)
                    .setProperty("namespace", "services")
                    .setProperty("service-name", "hazelcast-services");

ClusterManager mgr = new HazelcastClusterManager(config);
VertxOptions options= new VertxOptions();
options.setClusterManager(mgr);

How to pass custom configured VertxOptions to Quarkus-vertx?

I found in VertxCoreRecorder class there is List<Consumer<VertxOptions>> parameter but i dont know how to create and pass own Consumer<VertxOptions> implementation.


Solution

  • I don't believe you can configure VertxOptions from code.

    You could put a cluster.xml Hazelcast configuration file in the classpath instead.

    Note that the Vert.x cluster managers are not supported in Quarkus yet. You can make them work in JVM mode (see this attempt with Infinispan) but not in native mode.