Skip to content

[feat] PIP-466: Add V5 client API for scalable topics#25489

Open
merlimat wants to merge 7 commits intoapache:masterfrom
merlimat:st-v5-api
Open

[feat] PIP-466: Add V5 client API for scalable topics#25489
merlimat wants to merge 7 commits intoapache:masterfrom
merlimat:st-v5-api

Conversation

@merlimat
Copy link
Copy Markdown
Contributor

@merlimat merlimat commented Apr 8, 2026

Summary

Implementation of PIP-466: New Java Client API (V5) for scalable topic support.

  • Introduces the pulsar-client-api-v5 module with type-safe interfaces for scalable topics
  • Producer: Producer / ProducerBuilder with key-based routing, flow control, and async variants
  • StreamConsumer: exclusive segment assignment with key-ordered delivery, controller-coordinated rebalancing
  • QueueConsumer: shared dispatch across all segments, no controller required
  • CheckpointConsumer: externalized position tracking via serializable Checkpoint snapshots for stream processing frameworks (Flink, Beam)
  • PulsarClient / PulsarClientBuilder: entry point with ServiceLoader-based provider discovery
  • Async counterparts (AsyncProducer, AsyncStreamConsumer, AsyncQueueConsumer, AsyncCheckpointConsumer) for non-blocking usage
  • Schema, auth, config, and internal provider packages
  • Comprehensive usage examples in Examples.java

Related PIPs:

Test plan

  • Module compiles as part of full Gradle build
  • Integration tests with V5 client implementation (separate PR)

Introduce pulsar-client-api-v5 module with new consumer types for scalable
topics: StreamConsumer, QueueConsumer, and CheckpointConsumer. Define
Producer, Message, Schema, and PulsarClient interfaces with a clean API
design. Includes authentication, crypto, batching/compression config types,
and a ServiceLoader-based PulsarClientProvider SPI.
@merlimat merlimat changed the title Add V5 client API for scalable topics [feat] PIP-466: Add V5 client API for scalable topics Apr 8, 2026
@merlimat merlimat added this to the 5.0.0 milestone Apr 8, 2026
merlimat added 3 commits April 8, 2026 10:25
- Fix import ordering in Authentication, AuthenticationFactory, Schema
- Rename BUILDER type parameter to BuilderT in MessageMetadata
- Expand single-line exception constructors in PulsarClientException
- Rename uppercase Schema factory methods to camelCase
- Remove @hidden Javadoc tag from PulsarClientProvider
- Fix missing braces and import issues in Examples.java
…bleTracing

Move connection-level settings (connectionTimeout, connectionsPerBroker,
enableTcpNoDelay, keepAliveInterval, connectionMaxIdleTime, ioThreads,
callbackThreads, proxy) into a new ConnectionPolicy record with a builder.

Remove enableTracing flag — the client creates an internal OpenTelemetry
instance with metrics-only by default. Users who want tracing pass a custom
OpenTelemetry instance configured with a TracerProvider.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant