Add a call ACK / unack example to avoid confusing the retrial mechani…#11166
Merged
Conversation
Member
|
@yonyong thanks for your contribution! 🤝 |
BewareMyPower
requested changes
Jun 30, 2021
|
|
||
| The following example shows how to call the API : | ||
|
|
||
| ``` |
Contributor
There was a problem hiding this comment.
Suggested change
| ``` | |
| ```java |
Contributor
There was a problem hiding this comment.
Please also apply the change to other code snippets to mark the code block as Java language for correct highlight.
added 2 commits
June 30, 2021 18:47
…a language for correct highlight
BewareMyPower
approved these changes
Jul 1, 2021
Anonymitaet
requested changes
Jul 1, 2021
| - Messages are acknowledged individually. With individual acknowledgement, the consumer needs to acknowledge each message and sends an acknowledgement request to the broker. | ||
| - Messages are acknowledged cumulatively. With cumulative acknowledgement, the consumer only needs to acknowledge the last message it received. All messages in the stream up to (and including) the provided message are not re-delivered to that consumer. | ||
|
|
||
| The following example shows how to call the API With individual acknowledgement: |
Member
There was a problem hiding this comment.
Suggested change
| The following example shows how to call the API With individual acknowledgement: | |
| If you want to acknowledge messages individually, you can use the following API. |
Pls keep consistent overall
| ```java | ||
| consumer.acknowledge(msg); | ||
| ``` | ||
| If you are going to acknowledge messages cumulatively, you can use the following API: |
Member
There was a problem hiding this comment.
Suggested change
| If you are going to acknowledge messages cumulatively, you can use the following API: | |
| If you want to acknowledge messages cumulatively, you can use the following API. |
|
|
||
| Be aware that negative acknowledgment on ordered subscription types, such as Exclusive, Failover and Key_Shared, can cause failed messages to arrive consumers out of the original order. | ||
|
|
||
| The following example shows how to call the API : |
Member
There was a problem hiding this comment.
Suggested change
| The following example shows how to call the API : | |
| If you want to acknowledge messages negatively, you can use the following API. |
| .subscribe(); | ||
| ``` | ||
|
|
||
| The following example shows how to call the API to put messages into the retrial queue: |
Member
There was a problem hiding this comment.
Suggested change
| The following example shows how to call the API to put messages into the retrial queue: | |
| If you want to put messages into a retrial queue, you can use the following API. |
Anonymitaet
approved these changes
Jul 1, 2021
sijie
approved these changes
Jul 2, 2021
bharanic-dev
pushed a commit
to bharanic-dev/pulsar
that referenced
this pull request
Mar 18, 2022
apache#11166) * Add a call ACK / unack example to avoid confusing the retrial mechanism for beginners Co-authored-by: yangde <yangde@myai.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a call ACK / unack example to avoid confusing the retrial mechanism for beginners