Skip to content

[fix][client] The input parameters for PulsarPullConsumerImpl have been changed from PulsarAdmin parameters to Supplier format, requiring dynamic updates. - #27

Merged
zymap merged 1 commit into
apache:mainfrom
X-R-D:fix/fixPulsarPullConsumerImpl
Sep 22, 2026
Merged

zymap merged 1 commit into
apache:mainfrom
X-R-D:fix/fixPulsarPullConsumerImpl

Conversation

@StevenLuMT

@StevenLuMT StevenLuMT commented Sep 21, 2026

Copy link
Copy Markdown
Member

Motivation

PulsarPullConsumerImpl currently accepts a fixed PulsarAdmin instance. This is inconsistent with the existing Supplier<PulsarClient> design and prevents the pull consumer from obtaining an updated PulsarAdmin instance when the underlying client/admin needs to be refreshed dynamically.

Modifications

  1. Replace the PulsarAdmin constructor parameter in PulsarPullConsumerImpl with Supplier<PulsarAdmin>.
  2. Add getPulsarAdmin() to obtain and validate the current PulsarAdmin instance when it is needed.
  3. Update all PulsarAdmin usages, including:
    • partition metadata initialization;
    • offset-to-message-id cache initialization;
    • timestamp-based offset lookup;
    • consume stats query.
  4. Update existing PulsarPullConsumerTest cases to pass PulsarAdmin through a supplier.

Verifying this change

This change updates existing tests to use the new constructor signature. The existing pull consumer test coverage continues to verify:

  • pull consumer initialization;
  • offset lookup by timestamp;
  • consume stats query.

…en changed from PulsarAdmin parameters to Supplier format, requiring dynamic updates.
@zymap
zymap merged commit a78e04f into apache:main Sep 22, 2026
2 checks passed
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.

3 participants