You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by vv...@apache.org on 2022/04/06 02:23:53 UTC
[kafka] branch trunk updated: KAFKA-6204 KAFKA-7402 ProducerInterceptor should implement AutoCloseable (#11997)
This is an automated email from the ASF dual-hosted git repository.
vvcephei pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 29a6979c54 KAFKA-6204 KAFKA-7402 ProducerInterceptor should implement AutoCloseable (#11997)
29a6979c54 is described below
commit 29a6979c54fb835d5c1f252df839023fd3357f97
Author: Xavier Léauté <xv...@apache.org>
AuthorDate: Tue Apr 5 19:23:31 2022 -0700
KAFKA-6204 KAFKA-7402 ProducerInterceptor should implement AutoCloseable (#11997)
As part of KIP-376 we had ConsumerInterceptor implement AutoCloseable
but forgot to do the same for ProducerInterceptor. This fixes the
inconsistency and also addresses KAFKA-6204 at the same time.
Reviewers: John Roesler <vv...@apache.org>
---
.../java/org/apache/kafka/clients/producer/ProducerInterceptor.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clients/src/main/java/org/apache/kafka/clients/producer/ProducerInterceptor.java b/clients/src/main/java/org/apache/kafka/clients/producer/ProducerInterceptor.java
index 8f89d6faa9..48caf98d44 100644
--- a/clients/src/main/java/org/apache/kafka/clients/producer/ProducerInterceptor.java
+++ b/clients/src/main/java/org/apache/kafka/clients/producer/ProducerInterceptor.java
@@ -34,7 +34,7 @@ import org.apache.kafka.common.Configurable;
* <p>
* Implement {@link org.apache.kafka.common.ClusterResourceListener} to receive cluster metadata once it's available. Please see the class documentation for ClusterResourceListener for more information.
*/
-public interface ProducerInterceptor<K, V> extends Configurable {
+public interface ProducerInterceptor<K, V> extends Configurable, AutoCloseable {
/**
* This is called from {@link org.apache.kafka.clients.producer.KafkaProducer#send(ProducerRecord)} and
* {@link org.apache.kafka.clients.producer.KafkaProducer#send(ProducerRecord, Callback)} methods, before key and value