From 8572408c47a75143a5aebffbf06da901c448b879 Mon Sep 17 00:00:00 2001 From: David Kjerrumgaard <35466513+david-streamlio@users.noreply.github.com> Date: Mon, 15 Jun 2026 08:52:17 -0700 Subject: [PATCH 1/3] Pulsar Guard Netty native-transport reflection by classpath presence The Epoll/KQueue/IOUring channel classes are platform-specific and optional; only register the ones actually present on the classpath instead of registering all of them unconditionally. Co-Authored-By: Claude Opus 4.8 (1M context) --- ...llRyeReactiveMessagingPulsarProcessor.java | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java index fbe2e163bcc14..e4074eaebd096 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java +++ b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java @@ -169,16 +169,23 @@ public NativeImageConfigBuildItem pulsarRuntimeInitialized( // ReflectiveChannelFactory against the platform SocketChannel returned by // EventLoopUtil. quarkus-netty registers only the NIO variants; register // Epoll/KQueue/IOUring here so native image can find their no-arg - // constructors at runtime. Revisit when bumping pulsar-client — if Pulsar - // moves to non-reflective ChannelFactory factories, these can be removed. - reflectiveClass.produce(ReflectiveClassBuildItem - .builder("io.netty.channel.epoll.EpollSocketChannel", - "io.netty.channel.epoll.EpollDatagramChannel", - "io.netty.channel.kqueue.KQueueSocketChannel", - "io.netty.channel.kqueue.KQueueDatagramChannel", - "io.netty.incubator.channel.uring.IOUringSocketChannel", - "io.netty.incubator.channel.uring.IOUringDatagramChannel") - .constructors().build()); + // constructors at runtime. These native transports are platform-specific + // and optional, so only register the ones actually on the classpath. + // Revisit when bumping pulsar-client — if Pulsar moves to non-reflective + // ChannelFactory factories, these can be removed. + String[] nettyTransportChannels = { + "io.netty.channel.epoll.EpollSocketChannel", + "io.netty.channel.epoll.EpollDatagramChannel", + "io.netty.channel.kqueue.KQueueSocketChannel", + "io.netty.channel.kqueue.KQueueDatagramChannel", + "io.netty.incubator.channel.uring.IOUringSocketChannel", + "io.netty.incubator.channel.uring.IOUringDatagramChannel" + }; + for (String channel : nettyTransportChannels) { + if (QuarkusClassLoader.isClassPresentAtRuntime(channel)) { + reflectiveClass.produce(ReflectiveClassBuildItem.builder(channel).constructors().build()); + } + } Collection authPluginClasses = combinedIndex.getIndex() .getAllKnownImplementations(DotNames.PULSAR_AUTHENTICATION); From 05c90f34414ba5cfe065d373e757f1a771828618 Mon Sep 17 00:00:00 2001 From: David Kjerrumgaard <35466513+david-streamlio@users.noreply.github.com> Date: Mon, 15 Jun 2026 08:52:35 -0700 Subject: [PATCH 2/3] Pulsar Use getAllKnownImplementors for Jandex backport compatibility getAllKnownImplementations requires a more recent Jandex version, which blocks backporting this fix to older branches. Authentication and PulsarSslFactory are interfaces, so getAllKnownImplementors returns the same set without the newer-Jandex requirement. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../deployment/SmallRyeReactiveMessagingPulsarProcessor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java index e4074eaebd096..581806fc90926 100644 --- a/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java +++ b/extensions/smallrye-reactive-messaging-pulsar/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/pulsar/deployment/SmallRyeReactiveMessagingPulsarProcessor.java @@ -188,13 +188,13 @@ public NativeImageConfigBuildItem pulsarRuntimeInitialized( } Collection authPluginClasses = combinedIndex.getIndex() - .getAllKnownImplementations(DotNames.PULSAR_AUTHENTICATION); + .getAllKnownImplementors(DotNames.PULSAR_AUTHENTICATION); for (ClassInfo authPluginClass : authPluginClasses) { reflectiveClass.produce(ReflectiveClassBuildItem.builder(authPluginClass.name().toString()) .constructors().build()); } Collection sslFactoryClasses = combinedIndex.getIndex() - .getAllKnownImplementations(DotNames.PULSAR_SSL_FACTORY); + .getAllKnownImplementors(DotNames.PULSAR_SSL_FACTORY); for (ClassInfo sslFactoryClass : sslFactoryClasses) { reflectiveClass.produce(ReflectiveClassBuildItem.builder(sslFactoryClass.name().toString()) .constructors().build()); From 3e3c8b0a26bbe36e970a71bdf74e33d2ba666f93 Mon Sep 17 00:00:00 2001 From: David Kjerrumgaard <35466513+david-streamlio@users.noreply.github.com> Date: Wed, 8 Jul 2026 09:38:46 -0700 Subject: [PATCH 3/3] Upgrade Pulsar client to 4.2.3 --- 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 979e277bfcb8b..4bf6fa5fa4c13 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -212,7 +212,7 @@ 2.18.0 0.8.12 1.2.1 - 4.2.1 + 4.2.3 2.15.0 0.16.0