Skip to content

[Improve] PIP-313 Support force unsubscribe using consumer api#1220

Merged
RobertIndie merged 3 commits into
apache:masterfrom
crossoverJie:support-pip-313
May 20, 2024
Merged

[Improve] PIP-313 Support force unsubscribe using consumer api#1220
RobertIndie merged 3 commits into
apache:masterfrom
crossoverJie:support-pip-313

Conversation

@crossoverJie

@crossoverJie crossoverJie commented May 16, 2024

Copy link
Copy Markdown
Member

Motivation

To keep consistent with the Java client.

Releted PR: apache/pulsar#21687

Modifications

  • Add UnsubscribeForceapi for consumer.

Verifying this change

  • Make sure that the change passes the CI checks.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (yes)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (yes)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (GoDocs)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

if state := pc.getConsumerState(); state == consumerClosed || state == consumerClosing {
pc.log.WithField("state", state).Error("Failed to unsubscribe closing or closed consumer")
return nil
return errors.New("consumer state is closed")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@crossoverJie

Copy link
Copy Markdown
Member Author

@RobertIndie PTAL, thanks.

@RobertIndie RobertIndie added this to the v0.13.0 milestone May 20, 2024
@RobertIndie RobertIndie merged commit b0111a2 into apache:master May 20, 2024
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.

2 participants