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

[pulsar-client-cpp]Change state_ to closed when resultOk is returned #5446

Merged
merged 1 commit into from
Oct 23, 2019

Conversation

hrsakai
Copy link
Contributor

@hrsakai hrsakai commented Oct 23, 2019

Motivation

  • Consumer retry the connection forever even though Consumer::close() is called in following case.
1. Consumer connects to broker
2. Revoke the consumer's permission to consume(e.g. pulsar-admin namespaces revoke-permission --role "consumer.role" public/global/n1)
3. Execute Consumer.Close()
  • Closed seems to be better when ResultOk is returned in {ProducerImpl,ConsumerImpl}::closeAsync().

Modifications

  • Change state_ to Closing at the start of closing process in ConsumerImpl::closeAsync().
  • Change state_ to Closed when ResultOk is returned in {ProducerImpl,ConsumerImpl}::closeAsync()

@hrsakai hrsakai added type/bug The PR fixed a bug or issue reported a bug component/c++ labels Oct 23, 2019
@hrsakai hrsakai added this to the 2.5.0 milestone Oct 23, 2019
@hrsakai hrsakai self-assigned this Oct 23, 2019
@hrsakai
Copy link
Contributor Author

hrsakai commented Oct 23, 2019

rerun cpp tests

@hrsakai
Copy link
Contributor Author

hrsakai commented Oct 23, 2019

rerun java8 tests

@aahmed-se aahmed-se merged commit 492d92b into apache:master Oct 23, 2019
@hrsakai hrsakai deleted the fix-close-async branch June 17, 2020 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants