Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[improve][fn] Support subscriptionPosition and DLQ for Go instance #22457

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jiangpengcheng
Copy link
Contributor

Fixes #22445

Main Issue: #xyz

PIP: #xyz

Motivation

Modifications

Support subscriptionPosition and DLQ for Go instance

Verifying this change

  • Make sure that the change passes the CI checks.

  • 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

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: jiangpengcheng#32

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 8, 2024
lhotari
lhotari previously requested changes Apr 8, 2024
if retryDetails.MaxMessageRetries >= 0 {
dlqPolicy.MaxDeliveries = uint32(retryDetails.MaxMessageRetries)
}
retryEnable = true
Copy link
Member

Choose a reason for hiding this comment

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

isn't RetryEnable related to having RetryLetterTopic defined?

https://github.com/apache/pulsar-client-go/blob/393f80b4b93faa36936380b643426026a2b2cd02/pulsar/retry_router.go#L62-L75

I'd assume that DeadLetterTopic can be set without setting RetryEnable.

Copy link
Member

Choose a reason for hiding this comment

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

oh, it doesn't seem to be the case in pulsar-client-go: https://github.com/apache/pulsar-client-go/blob/393f80b4b93faa36936380b643426026a2b2cd02/pulsar/consumer_impl.go#L116-L168

In the Java client, this is different. It seems to make sense that DLQ feature is independent of retrying, but that's not how pulsar-client-go is implemented.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems it's more reasonable to leave RetryEnable to false here, then it just won't set the default DeadLetterTopic

@lhotari lhotari dismissed their stale review April 8, 2024 12:17

Dismissing my review since I made an invalid assumption of pulsar-client-go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-not-needed Your PR changes do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants