From 2dde78fb2604c47eca759cc3a4f6963a908ffaea Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Mon, 9 Nov 2020 19:09:02 +0100 Subject: [PATCH 1/2] Update SmallRye Reactive Messaging to version 2.5.0 --- bom/application/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 997092dde273b..ec28a9e3848cd 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -47,7 +47,7 @@ 1.0.19 1.0.13 1.2.2 - 2.4.0 + 2.5.0 1.2.1 1.3.5 3.0.3 From d6fc10c3554d7e0f0a75319addd2d7968858f43b Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Mon, 9 Nov 2020 19:09:36 +0100 Subject: [PATCH 2/2] The 'throttled' commit strategy requires substituting the built-in rebalance listener. --- .../SmallRyeReactiveMessagingKafkaProcessor.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java index 4ddc060e63c2d..3dbf037eb5b1a 100644 --- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java +++ b/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/SmallRyeReactiveMessagingKafkaProcessor.java @@ -1,8 +1,11 @@ package io.quarkus.smallrye.reactivemessaging.kafka.deployment; import io.quarkus.deployment.Feature; +import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; +import io.vertx.kafka.client.consumer.impl.KafkaReadStreamImpl; public class SmallRyeReactiveMessagingKafkaProcessor { @@ -10,4 +13,17 @@ public class SmallRyeReactiveMessagingKafkaProcessor { FeatureBuildItem feature() { return new FeatureBuildItem(Feature.SMALLRYE_REACTIVE_MESSAGING_KAFKA); } + + @BuildStep + public void build(BuildProducer reflectiveClass) { + // Required for the throttled commit strategy + reflectiveClass.produce( + ReflectiveClassBuildItem.builder(KafkaReadStreamImpl.class) + .fields(true) + .methods(true) + .constructors(true) + .finalFieldsWritable(true) + .build()); + } + }