Class DefaultKafkaProducerFactory.CloseSafeProducer<K,V>
java.lang.Object
org.springframework.kafka.core.DefaultKafkaProducerFactory.CloseSafeProducer<K,V>
- Type Parameters:
K- the key type.V- the value type.
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.kafka.clients.producer.Producer<K,V>
- Enclosing class:
DefaultKafkaProducerFactory<K,V>
protected static class DefaultKafkaProducerFactory.CloseSafeProducer<K,V>
extends Object
implements org.apache.kafka.clients.producer.Producer<K,V>
A wrapper class for the delegate.
- Author:
- Gary Russell, Murali Reddy, Nakul Mishra, Artem Bilan, Chris Gilbert, Thomas Strauß, Adrian Gygax, Soby Chacko, Jaeyeon Kim, Alexandros Papadakis
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidorg.apache.kafka.common.UuidclientInstanceId(Duration timeout) voidclose()voidvoidvoidflush()voidMap<org.apache.kafka.common.MetricName, ? extends org.apache.kafka.common.Metric> metrics()List<org.apache.kafka.common.PartitionInfo> partitionsFor(String topic) voidregisterMetricForSubscription(org.apache.kafka.common.metrics.KafkaMetric kafkaMetric) Future<org.apache.kafka.clients.producer.RecordMetadata> Future<org.apache.kafka.clients.producer.RecordMetadata> send(org.apache.kafka.clients.producer.ProducerRecord<K, V> record, org.apache.kafka.clients.producer.Callback callback) voidsendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition, org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets, org.apache.kafka.clients.consumer.ConsumerGroupMetadata groupMetadata) toString()voidunregisterMetricFromSubscription(org.apache.kafka.common.metrics.KafkaMetric kafkaMetric)
-
Method Details
-
send
-
send
-
flush
-
partitionsFor
-
metrics
-
clientInstanceId
-
initTransactions
-
beginTransaction
-
sendOffsetsToTransaction
public void sendOffsetsToTransaction(Map<org.apache.kafka.common.TopicPartition, org.apache.kafka.clients.consumer.OffsetAndMetadata> offsets, org.apache.kafka.clients.consumer.ConsumerGroupMetadata groupMetadata) throws org.apache.kafka.common.errors.ProducerFencedException -
commitTransaction
-
abortTransaction
-
registerMetricForSubscription
-
unregisterMetricFromSubscription
-
close
-
close
-
toString
-