Skip to content

[3.x] Upgrade pulsar client 4.2.3#55312

Merged
geoand merged 7 commits into
quarkusio:3.xfrom
ozangunalp:3.x_upgrade-pulsar-client-4.2.3
Jul 9, 2026
Merged

[3.x] Upgrade pulsar client 4.2.3#55312
geoand merged 7 commits into
quarkusio:3.xfrom
ozangunalp:3.x_upgrade-pulsar-client-4.2.3

Conversation

@ozangunalp

Copy link
Copy Markdown
Contributor

Backport of #54516 on 3.x.

Fixes #55289

david-streamlio and others added 7 commits July 7, 2026 11:34
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>
@quarkus-bot

quarkus-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

Thanks for your pull request!

Your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)

This message is automatically generated by a bot.

@quarkus-bot

quarkus-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit d22c93d.

Failing Jobs

Status Name Step Failures Logs Raw logs Build scan
Quickstarts - JDK 25 Clone Quickstarts ⚠️ Check → Logs Raw logs 🚧

@jerboaa

jerboaa commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Mandrel 25.0 CI run with this: https://github.com/graalvm/mandrel/actions/runs/28871024814

@jerboaa

jerboaa commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@geoand
geoand merged commit 5a92019 into quarkusio:3.x Jul 9, 2026
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[3.x] Reactive messaging (pulsar) native integration test fails after #54794

4 participants