From 17ad275801b5d0014e279c8efecd947ce2f14407 Mon Sep 17 00:00:00 2001 From: Ozan Gunalp Date: Mon, 6 Feb 2023 14:28:27 +0000 Subject: [PATCH] Remove vertx-kafka-client dependency from smallrye-reactive-messaging-kafka Fixes #22295 --- bom/application/pom.xml | 31 ------ .../kafka/deployment/KafkaCodecProcessor.java | 75 ------------- ...allRyeReactiveMessagingKafkaProcessor.java | 20 ++-- .../deployment/DefaultSerdeConfigTest.java | 100 +++++++++--------- .../deployment/VertxSerdeRemovedTest.java | 36 ------- .../runtime/pom.xml | 14 --- .../KafkaCodecDependencyRemovalLogger.java | 20 ---- .../src/test/resources/client.keytab | Bin 34140 -> 34298 bytes .../src/test/resources/kafkabroker.keytab | Bin 33718 -> 33874 bytes 9 files changed, 56 insertions(+), 240 deletions(-) delete mode 100644 extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/KafkaCodecProcessor.java delete mode 100644 extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/VertxSerdeRemovedTest.java delete mode 100644 extensions/smallrye-reactive-messaging-kafka/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/KafkaCodecDependencyRemovalLogger.java diff --git a/bom/application/pom.xml b/bom/application/pom.xml index 5b6144f12cd80..0a3ec503ccc07 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -5224,37 +5224,6 @@ client ${scram-client.version} - - io.vertx - vertx-kafka-client - ${vertx.version} - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.module - jackson-module-scala_2.12 - - - org.scala-lang - scala-reflect - - - org.apache.kafka - kafka-clients - - - com.101tec - zkclient - - - org.slf4j - slf4j-log4j12 - - - com.cronutils cron-utils diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/KafkaCodecProcessor.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/KafkaCodecProcessor.java deleted file mode 100644 index 9463f5a6f2127..0000000000000 --- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/KafkaCodecProcessor.java +++ /dev/null @@ -1,75 +0,0 @@ -package io.quarkus.smallrye.reactivemessaging.kafka.deployment; - -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.MethodVisitor; -import org.objectweb.asm.Opcodes; - -import io.quarkus.deployment.annotations.BuildProducer; -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.builditem.BytecodeTransformerBuildItem; -import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; -import io.quarkus.gizmo.Gizmo; -import io.quarkus.smallrye.reactivemessaging.kafka.KafkaCodecDependencyRemovalLogger; -import io.vertx.kafka.client.serialization.BufferDeserializer; -import io.vertx.kafka.client.serialization.BufferSerializer; -import io.vertx.kafka.client.serialization.JsonArrayDeserializer; -import io.vertx.kafka.client.serialization.JsonArraySerializer; -import io.vertx.kafka.client.serialization.JsonObjectDeserializer; -import io.vertx.kafka.client.serialization.JsonObjectSerializer; - -public class KafkaCodecProcessor { - - static final Class[] VERTX_KAFKA_CLIENT_SERDES = { - JsonObjectSerializer.class, - BufferSerializer.class, - JsonArraySerializer.class, - - JsonObjectDeserializer.class, - BufferDeserializer.class, - JsonArrayDeserializer.class, - }; - - @BuildStep - public void build(BuildProducer reflectiveClass) { - for (Class s : VERTX_KAFKA_CLIENT_SERDES) { - reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, s.getName())); - } - } - - @BuildStep - public void deprecateVertxProvidedSerde(BuildProducer producer) { - for (Class vertxSerdeClass : VERTX_KAFKA_CLIENT_SERDES) { - producer.produce(new BytecodeTransformerBuildItem(vertxSerdeClass.getName(), - KafkaCodecDeprecateClassVisitor::new)); - } - } - - private static class KafkaCodecDeprecateClassVisitor extends ClassVisitor { - - private final String fqcn; - - protected KafkaCodecDeprecateClassVisitor(String fqcn, ClassVisitor classVisitor) { - super(Gizmo.ASM_API_VERSION, classVisitor); - this.fqcn = fqcn; - } - - @Override - public MethodVisitor visitMethod(int access, String name, String descriptor, String signature, String[] exceptions) { - MethodVisitor methodVisitor = super.visitMethod(access, name, descriptor, signature, exceptions); - if (name.equals("")) { - return new MethodVisitor(Gizmo.ASM_API_VERSION, methodVisitor) { - @Override - public void visitCode() { - super.visitCode(); - visitLdcInsn(fqcn); // load fqcn as constant - visitMethodInsn(Opcodes.INVOKESTATIC, - KafkaCodecDependencyRemovalLogger.class.getName().replace(".", "/"), "logDependencyRemoval", - "(Ljava/lang/String;)V", false); - } - }; - } else { - return methodVisitor; - } - } - } -} 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 d383c31393626..e20f5a8acb692 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 @@ -48,7 +48,6 @@ import io.smallrye.mutiny.tuples.Functions.TriConsumer; import io.smallrye.reactive.messaging.kafka.KafkaConnector; import io.smallrye.reactive.messaging.kafka.commit.ProcessingState; -import io.vertx.kafka.client.consumer.impl.KafkaReadStreamImpl; public class SmallRyeReactiveMessagingKafkaProcessor { @@ -64,13 +63,6 @@ FeatureBuildItem feature() { @BuildStep public void build(BuildProducer reflectiveClass) { - // Required for the throttled commit strategy - reflectiveClass.produce( - ReflectiveClassBuildItem.builder(KafkaReadStreamImpl.class) - .fields(true) - .methods(true) - .constructors(true) - .build()); reflectiveClass.produce(new ReflectiveClassBuildItem(true, true, ProcessingState.class)); } @@ -680,9 +672,9 @@ private static boolean isRawMessage(Type type) { // Kafka types Map.entry(DotName.createSimple(org.apache.kafka.common.utils.Bytes.class.getName()), org.apache.kafka.common.serialization.BytesDeserializer.class.getName()), // Vert.x types - Map.entry(DotName.createSimple(io.vertx.core.buffer.Buffer.class.getName()), io.vertx.kafka.client.serialization.BufferDeserializer.class.getName()), - Map.entry(DotName.createSimple(io.vertx.core.json.JsonObject.class.getName()), io.vertx.kafka.client.serialization.JsonObjectDeserializer.class.getName()), - Map.entry(DotName.createSimple(io.vertx.core.json.JsonArray.class.getName()), io.vertx.kafka.client.serialization.JsonArrayDeserializer.class.getName()) + Map.entry(DotName.createSimple(io.vertx.core.buffer.Buffer.class.getName()), io.quarkus.kafka.client.serialization.BufferDeserializer.class.getName()), + Map.entry(DotName.createSimple(io.vertx.core.json.JsonObject.class.getName()), io.quarkus.kafka.client.serialization.JsonObjectDeserializer.class.getName()), + Map.entry(DotName.createSimple(io.vertx.core.json.JsonArray.class.getName()), io.quarkus.kafka.client.serialization.JsonArrayDeserializer.class.getName()) ); private static final Map KNOWN_SERIALIZERS = Map.ofEntries( @@ -709,9 +701,9 @@ private static boolean isRawMessage(Type type) { // Kafka types Map.entry(DotName.createSimple(org.apache.kafka.common.utils.Bytes.class.getName()), org.apache.kafka.common.serialization.BytesSerializer.class.getName()), // Vert.x types - Map.entry(DotName.createSimple(io.vertx.core.buffer.Buffer.class.getName()), io.vertx.kafka.client.serialization.BufferSerializer.class.getName()), - Map.entry(DotName.createSimple(io.vertx.core.json.JsonObject.class.getName()), io.vertx.kafka.client.serialization.JsonObjectSerializer.class.getName()), - Map.entry(DotName.createSimple(io.vertx.core.json.JsonArray.class.getName()), io.vertx.kafka.client.serialization.JsonArraySerializer.class.getName()) + Map.entry(DotName.createSimple(io.vertx.core.buffer.Buffer.class.getName()), io.quarkus.kafka.client.serialization.BufferSerializer.class.getName()), + Map.entry(DotName.createSimple(io.vertx.core.json.JsonObject.class.getName()), io.quarkus.kafka.client.serialization.JsonObjectSerializer.class.getName()), + Map.entry(DotName.createSimple(io.vertx.core.json.JsonArray.class.getName()), io.quarkus.kafka.client.serialization.JsonArraySerializer.class.getName()) ); // @formatter:on diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/DefaultSerdeConfigTest.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/DefaultSerdeConfigTest.java index c14c53b28167d..be99802f9ea0e 100644 --- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/DefaultSerdeConfigTest.java +++ b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/DefaultSerdeConfigTest.java @@ -1124,18 +1124,18 @@ Multi method43(Multi payload) { public void jacksonDtoInVertxJsonObjectOut() { // @formatter:off Tuple[] expectations = { - tuple("mp.messaging.outgoing.channel1.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel2.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel3.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel4.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel5.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel6.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel7.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel8.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel9.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel10.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel11.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), - tuple("mp.messaging.outgoing.channel12.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel1.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel2.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel3.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel4.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel5.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel6.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel7.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel8.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel9.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel10.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel11.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel12.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel13.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), tuple("mp.messaging.incoming.channel14.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), @@ -1148,50 +1148,50 @@ public void jacksonDtoInVertxJsonObjectOut() { tuple("mp.messaging.incoming.channel21.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), tuple("mp.messaging.incoming.channel22.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel23.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel23.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel24.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel25.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel25.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel26.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel27.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel27.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel28.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel29.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel29.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel30.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel31.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel31.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel32.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel33.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel33.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel34.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel35.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel35.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel36.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel37.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel37.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel38.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel39.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel39.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel40.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel41.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel41.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel42.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel43.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel43.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel44.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel45.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel45.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel46.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel47.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel47.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel48.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel49.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel49.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel50.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel51.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel51.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel52.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel53.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel53.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel54.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel55.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel55.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel56.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel57.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel57.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel58.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel59.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel59.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel60.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel61.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel61.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel62.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel63.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel63.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), tuple("mp.messaging.incoming.channel64.value.deserializer", "io.quarkus.smallrye.reactivemessaging.kafka.deployment.DefaultSerdeConfigTest$JacksonDtoDeserializer"), - tuple("mp.messaging.outgoing.channel65.value.serializer", "io.vertx.kafka.client.serialization.JsonObjectSerializer"), + tuple("mp.messaging.outgoing.channel65.value.serializer", "io.quarkus.kafka.client.serialization.JsonObjectSerializer"), }; // @formatter:on @@ -2230,30 +2230,30 @@ public void floatJsonArrayInShortByteArrayOut() { tuple("mp.messaging.outgoing.channel10.key.serializer", "org.apache.kafka.common.serialization.ShortSerializer"), tuple("mp.messaging.outgoing.channel10.value.serializer", "org.apache.kafka.common.serialization.ByteArraySerializer"), - tuple("mp.messaging.incoming.channel11.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), - tuple("mp.messaging.incoming.channel12.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel11.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel12.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel13.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel13.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel13.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel14.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel14.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel14.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel15.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel15.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), - tuple("mp.messaging.incoming.channel16.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), - tuple("mp.messaging.incoming.channel17.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel15.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel16.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel17.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel18.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel18.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel18.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel19.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel19.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel19.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel20.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel20.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), - tuple("mp.messaging.incoming.channel21.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), - tuple("mp.messaging.incoming.channel22.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel20.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel21.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel22.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel23.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel23.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel23.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel24.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel24.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel24.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), tuple("mp.messaging.incoming.channel25.key.deserializer", "org.apache.kafka.common.serialization.FloatDeserializer"), - tuple("mp.messaging.incoming.channel25.value.deserializer", "io.vertx.kafka.client.serialization.JsonArrayDeserializer"), + tuple("mp.messaging.incoming.channel25.value.deserializer", "io.quarkus.kafka.client.serialization.JsonArrayDeserializer"), }; // @formatter:on @@ -2567,7 +2567,7 @@ public void genericSerdeImplementationAutoDetect() { tuple("mp.messaging.outgoing.channel1.value.serializer", "org.apache.kafka.common.serialization.LongSerializer"), tuple("mp.messaging.incoming.channel2.key.deserializer", "org.apache.kafka.common.serialization.LongDeserializer"), - tuple("mp.messaging.incoming.channel2.value.deserializer", "io.vertx.kafka.client.serialization.JsonObjectDeserializer"), + tuple("mp.messaging.incoming.channel2.value.deserializer", "io.quarkus.kafka.client.serialization.JsonObjectDeserializer"), }; Tuple[] expectations2 = { diff --git a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/VertxSerdeRemovedTest.java b/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/VertxSerdeRemovedTest.java deleted file mode 100644 index c496aeb09f0bb..0000000000000 --- a/extensions/smallrye-reactive-messaging-kafka/deployment/src/test/java/io/quarkus/smallrye/reactivemessaging/kafka/deployment/VertxSerdeRemovedTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.quarkus.smallrye.reactivemessaging.kafka.deployment; - -import static org.assertj.core.api.Assertions.assertThat; - -import jakarta.enterprise.context.ApplicationScoped; - -import org.eclipse.microprofile.reactive.messaging.Incoming; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.RegisterExtension; - -import io.quarkus.test.QuarkusUnitTest; -import io.vertx.core.json.JsonObject; - -public class VertxSerdeRemovedTest { - - @RegisterExtension - static final QuarkusUnitTest TEST = new QuarkusUnitTest() - .withApplicationRoot(jar -> jar.addClass(IncomingChannel.class)); - - @ApplicationScoped - public static class IncomingChannel { - - @Incoming("in") - public void consume(JsonObject payload) { - // no-op - } - } - - @Test - void test_logged_depreciation_notice() { - TEST.assertLogRecords(records -> { - assertThat(records).anyMatch(log -> log.getLoggerName().contains("KafkaCodecDependencyRemovalLogger") && - log.getMessage().contains("io.quarkus.kafka.client.serialization.JsonObjectDeserializer")); - }); - } -} diff --git a/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml b/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml index 145bf6024f329..e9d51617b49af 100644 --- a/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml @@ -47,20 +47,6 @@ kafka-clients - - io.vertx - vertx-kafka-client - - - com.google.code.findbugs - jsr305 - - - log4j - log4j - - - io.quarkus quarkus-smallrye-reactive-messaging diff --git a/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/KafkaCodecDependencyRemovalLogger.java b/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/KafkaCodecDependencyRemovalLogger.java deleted file mode 100644 index 56c6374beff1e..0000000000000 --- a/extensions/smallrye-reactive-messaging-kafka/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/kafka/KafkaCodecDependencyRemovalLogger.java +++ /dev/null @@ -1,20 +0,0 @@ -package io.quarkus.smallrye.reactivemessaging.kafka; - -import org.jboss.logging.Logger; - -public class KafkaCodecDependencyRemovalLogger { - - private static final Logger LOGGER = Logger.getLogger(KafkaCodecDependencyRemovalLogger.class.getName()); - - private static final String TARGET_SERDE_PACKAGE = "io.vertx.kafka.client.serialization"; - private static final String REPLACEMENT_SERDE_PACKAGE = "io.quarkus.kafka.client.serialization"; - - public static void logDependencyRemoval(String deprecatedClassName) { - LOGGER.warnf("Dependency to be removed: The Serde class `%s` will no longer be included " + - "in the classpath of the Smallrye Reactive Messaging Kafka extension. " + - "Consider replacing it's usage with `%s` provided by the Kafka extension " + - "or including the Vert.x Kafka client dependency (io.vertx:vertx-kafka-client) yourself.", - deprecatedClassName, deprecatedClassName.replace(TARGET_SERDE_PACKAGE, REPLACEMENT_SERDE_PACKAGE)); - } - -} diff --git a/integration-tests/kafka-sasl-elytron/src/test/resources/client.keytab b/integration-tests/kafka-sasl-elytron/src/test/resources/client.keytab index aeaf06c7971d5b78ca3a0db120afbcb2a61ddfd9..989e7c820a06e5b0822609ea772f749ed7183cf3 100644 GIT binary patch delta 89 zcmcc9#q_J2X+uow&2*=WX+uma02pWlfdBvi diff --git a/integration-tests/kafka-sasl-elytron/src/test/resources/kafkabroker.keytab b/integration-tests/kafka-sasl-elytron/src/test/resources/kafkabroker.keytab index bb6576d5c70ea4347756a8228fb32707b56a4bd5..1a9e2c7ecee14cb5326e1ef58d9f3cd271cb62bd 100644 GIT binary patch delta 88 zcmdni&UC4RX~VYWiJLSvlOHMvF)|1-D9qVjIqAr^N#Z~Aw(fecsLm$5tn6>#Zx?P| r8J|R