[Issue 335]Fix producer state by reconnecting when receiving unexpected receipts… #336
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.
… (#335)
<--
Contribution Checklist
Name the pull request in the form "[Issue XYZ][component] Title of the pull request", where XYZ should be replaced by the actual issue number.
Skip Issue XYZ if there is no associated github issue for this pull request.
Skip component if you are unsure about which is the best component. E.g.
[docs] Fix typo in produce method
.Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
Each pull request should address only one issue, not mix up code from multiple issues.
Each commit in the pull request has a meaningful commit message
Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
(The sections below can be removed for hotfixes of typos)
-->
Fixes #335
Motivation
When there is a bug in the broker causing the ACK to come back out of order. The current behavior is to log a warning and keep going. The problem is that the partition producer with this behavior cannot recover, it will be stuck in that state forever.
Modifications
The fix consists to close the connection to the broker so that the pending requests will sent again to the broker to have another chance to get a consistent state between the producer and the broker.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation