[3.x] Upgrade pulsar client 4.2.3#55312
Merged
Merged
Conversation
Bumps the Apache Pulsar client from 3.3.0 to 4.2.1 in the BOM and removes the runtime-initialized class registration for org.apache.pulsar.client.util.WithSNISslEngineFactory, which was removed upstream in Pulsar 4.x. The dangling reference caused a ClassNotFoundException during native image generation when applications overrode pulsar-client.version to a 4.x release. Fixes quarkusio#48776
Pulsar 4.2.x introduced DnsResolverGroupImpl, whose createDnsNameResolverBuilder calls Netty's DnsNameResolverBuilder.socketChannelType(Class, boolean) with the platform SocketChannel returned by EventLoopUtil. That builder constructs a ReflectiveChannelFactory which calls Class.getConstructor() on the channel class at runtime. quarkus-netty registers only the NIO variants, so on Linux native runs the lookup of EpollSocketChannel.<init>() fails with NoSuchMethodException, preventing the Pulsar client from starting. Register the Epoll, KQueue, and IOUring socket and datagram channel classes with .constructors() so native image can find their no-arg constructors at runtime.
Pulsar 4.2.x's LightProtoCodec computes Unsafe field offsets (String.value field offset and byte[] base offset) in its static initializer. GraalVM cannot automatically recompute these, so initializing the class at image-build time bakes in host-JVM offsets and causes a segfault at runtime in writeRawString. Initialize it at run time so the offsets match the SubstrateVM heap layout. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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) <noreply@anthropic.com>
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) <noreply@anthropic.com>
|
Thanks for your pull request! Your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
Contributor
|
Mandrel 25.0 CI run with this: https://github.com/graalvm/mandrel/actions/runs/28871024814 |
Contributor
https://github.com/graalvm/mandrel/actions/runs/28871024814/job/85643022772#step:12:1361 (pulsar messaging IT test is passing with this) |
geoand
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #54516 on 3.x.
Fixes #55289