KAFKA-9830: Backport "Implement AutoCloseable in ErrorReporter and subclasses"#8594
Closed
gharris1727 wants to merge 2 commits intoapache:2.1from
Closed
KAFKA-9830: Backport "Implement AutoCloseable in ErrorReporter and subclasses"#8594gharris1727 wants to merge 2 commits intoapache:2.1from
gharris1727 wants to merge 2 commits intoapache:2.1from
Conversation
…pache#8442) * The DeadLetterQueueReporter has a KafkaProducer that it must close to clean up resources * Currently, the producer and its threads are leaked every time a task is stopped * Responsibility for cleaning up ErrorReporters is transitively assigned to the ProcessingContext, RetryWithToleranceOperator, and WorkerSinkTask/WorkerSinkTask classes * One new unit test in ErrorReporterTest asserts that the producer is closed by the dlq reporter Reviewers: Arjun Satish <arjun@confluent.io>, Chris Egerton <chrise@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>, Konstantine Karantasis <konstantine@confluent.io>
…ed here Signed-off-by: Greg Harris <gregh@confluent.io>
Contributor
Author
|
cc @kkonstantine for review. |
Contributor
|
Backporting #8442 up to |
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.
This is a backport of #8442 for the 2.0 and 2.1 branches.
In these versions, producer.close(Duration) does not exist, and producer.close(long, TimeUnit) is not deprecated. The tests are adjusted to use the older API.
Committer Checklist (excluded from commit message)