diff --git a/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java b/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java index 319d51f966a1c..8937c18809485 100644 --- a/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java +++ b/extensions/redis-client/deployment/src/main/java/io/quarkus/redis/client/deployment/RedisClientProcessor.java @@ -74,8 +74,15 @@ HealthBuildItem addHealthCheck(RedisBuildTimeConfig buildTimeConfig) { } @BuildStep - RuntimeInitializedClassBuildItem initializeBulkTypeDuringRuntime() { - return new RuntimeInitializedClassBuildItem(BulkType.class.getName()); + public void registerRuntimeInitializedClasses(BuildProducer producer) { + producer.produce(new RuntimeInitializedClassBuildItem(BulkType.class.getName())); + // Classes using SplittableRandom, which need to be runtime initialized + producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisSentinelClient")); + producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.Slots")); + producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisClusterConnection")); + // RedisClusterConnections is referenced from RedisClusterClient. Thus, we need to runtime-init + // that too. + producer.produce(new RuntimeInitializedClassBuildItem("io.vertx.redis.client.impl.RedisClusterClient")); } @BuildStep