[improve][pip] PIP-496: Pulsar Functions and IO support for the V5 client and scalable topics - #26698
Merged
Merged
Conversation
…ient and scalable topics Assisted-by: Claude Code (claude-opus-5-5)
Merged
5 of 11 tasks
Dream95
reviewed
Sep 29, 2026
Contributor
|
This PIP shows that while Pulsar Functions and IO can now support scalable topics through the V5 client, V5 still has some gaps compared with V4. As more components move to V5, I think we should focus on closing those gaps. |
merlimat
approved these changes
Sep 29, 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.
PIP: PIP-496, pip/pip-496.md
Motivation
Pulsar Functions and Pulsar IO use the v4 Java client throughout. As a result, a function, source or sink cannot
read or write a scalable topic (
topic://, PIP-460), which only the V5 client (PIP-466) supports. Every functionor connector attached to a
persistent://topic also blocks the PIP-475 migration of that topic, becausemigration refuses while a v4 producer or consumer is attached.
Modifications
This PR adds the proposal document
pip/pip-496.md. The proposal:pulsar-clientandpulsar-perfCLIs:topic://topics use the V5 client and other topics the v4 client, with no configuration.clientApisetting (V4/V5, also--client-apionpulsar-admin functions|sources|sinks)makes the V5 client drive
persistent://topics. That lets PIP-475 migrate the topics of a running componentwith a Shared subscription.
QueueConsumer, with the same ack, negative-ack, timeout and dead letter behavior as with v4.StreamConsumer, which gives per-key order and acknowledgesthe completed prefix of the records.
later versions, because instances check them again at start.
BaseContext.getPulsarClientV5().Context.newOutputMessage(...)publishes totopic://topics with the V5 client in every component.AUTO). The upgrade and rollbacksections cover the new proto field, older workers and older runtime images.
Reference implementation. #26697 has unit tests and end-to-end tests
against a TLS-authenticated broker with the thread runtime. Those tests cover:
topic://topics;clientApi=V5Shared function whosepersistent://input is migrated with PIP-475 while it runs.Review. The document went through three rounds of independent review with a subtractive, minimalism-focused
lens. The Resolved design decisions section records what was cut, each with its additive way back, and what was
kept and why. The review cut three API methods (
newOutputMessageV5,getPulsarClientBuilderV5,Record.getMessageV5) and led to fixes in the reference implementation.Open question for the discussion. Should one component be allowed to mix
topic://topics with othertopics? The proposal keeps the CLIs' stricter one-domain rule, which can be relaxed later without breaking
anything (see Alternatives).
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes