Skip to content

Commit f99f02c

Browse files
authored
Fix KafkaProducer resources have never been released. (#4302)
1 parent e1b69a2 commit f99f02c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/sink/KafkaTransactionSender.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public void close() {
122122

123123
private KafkaInternalProducer<K, V> getTransactionProducer(
124124
Properties properties, String transactionId) {
125+
close();
125126
Properties transactionProperties = (Properties) properties.clone();
126127
transactionProperties.put(ProducerConfig.TRANSACTIONAL_ID_CONFIG, transactionId);
127128
KafkaInternalProducer<K, V> transactionProducer =

0 commit comments

Comments
 (0)