Skip to content

Conversation

@candu
Copy link
Contributor

@candu candu commented May 21, 2025

Fixes #415

Motivation

At my current employer, we have a centrally-managed Pulsar cluster that requires use of a pre-assigned subscriptionRolePrefix for your client when creating a reader.

As per docs, you should be able to do this with:

client.createReader({
  topic,
  startMessageId: Pulsar.MessageId.earliest(),
  subscriptionRolePrefix: subscriptionPrefix,
});

However, this bug prevents that from working correctly.

Modifications

Small change in ReaderConfig.cc to call the correct PULSAR_PUBLIC function.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage. That said: I did test that, by using my patched client, I can create a reader in our internal setup described above. (Without the patch, it fails.)

(Due to NDA, I can't describe that setup in more detail, sadly.)

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

Docs are not needed: this fixes a feature that is already documented, but which did not previously work as intended.

Copy link
Member

@shibd shibd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@shibd shibd merged commit 8b2cfd3 into apache:master May 22, 2025
12 checks passed
@shibd shibd added this to the 1.14.0 milestone May 26, 2025
shibd pushed a commit that referenced this pull request May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

subscriptionRolePrefix is not handled properly in ReaderConfig

2 participants