You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/07 06:53:12 UTC
[GitHub] [pulsar] crossoverJie opened a new pull request, #18795: [fix][client] Fix close consumer graceful
crossoverJie opened a new pull request, #18795:
URL: https://github.com/apache/pulsar/pull/18795
<!-- Either this PR fixes an issue, -->
Fixes #8308
### Motivation
Wait for the consumer's job to finish before closing the consumer.
### Modifications
```java
Consumer<String> consumer = pulsarClient.newConsumer(Schema.STRING)
.topics(listTopic)
.subscriptionName(subscriptionName)
.subscriptionType(SubscriptionType.Shared)
.closeWaitForJob(CloseWaitForJobPolicy.builder()
.closeWaitForJob(true)
.timeout(5, TimeUnit.SECONDS)
.build())
.subscribe();
```
New wait notification mechanism when closing consumer.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change is already covered by existing tests, such as:
https://github.com/crossoverJie/pulsar/blob/fcc050abc60aead29a80c133648c5df2feaa7f34/pulsar-broker/src/test/java/org/apache/pulsar/client/impl/ConsumerWaitCloseTest.java#L46
### 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
- [ ] Anything that affects deployment
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] crossoverJie closed pull request #18795: [fix][client] New API for closing the consumer after waiting for the job to complete
Posted by GitBox <gi...@apache.org>.
crossoverJie closed pull request #18795: [fix][client] New API for closing the consumer after waiting for the job to complete
URL: https://github.com/apache/pulsar/pull/18795
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] crossoverJie commented on pull request #18795: [fix][client] New API for closing the consumer after waiting for the job to complete
Posted by GitBox <gi...@apache.org>.
crossoverJie commented on PR #18795:
URL: https://github.com/apache/pulsar/pull/18795#issuecomment-1340858086
> This PR added new public APIs, please open a [PIP](https://github.com/apache/pulsar/blob/master/wiki/proposals/PIP.md?rgh-link-date=2022-12-07T07%3A22%3A40Z) first.
Got it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on pull request #18795: [fix][client] Fix close consumer graceful
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #18795:
URL: https://github.com/apache/pulsar/pull/18795#issuecomment-1340477951
@crossoverJie Please add the following content to your PR description and select a checkbox:
```
- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org