K - the type of keyV - the type of valuepublic static interface KafkaCluster.InteractiveProducer<K,V> extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this producer's connection to Kafka and clean up all resources.
|
KafkaCluster.InteractiveProducer<K,V> |
write(org.apache.kafka.clients.producer.ProducerRecord<K,V> record)
Write the specified record to the topic with the given name.
|
default KafkaCluster.InteractiveProducer<K,V> |
write(String topic,
K key,
V value)
Write to the topic with the given name a record with the specified key and value.
|
default KafkaCluster.InteractiveProducer<K,V> write(String topic, K key, V value)
topic - the name of the topic; may not be nullkey - the key; may not be nullvalue - the value; may not be nullKafkaCluster.InteractiveProducer<K,V> write(org.apache.kafka.clients.producer.ProducerRecord<K,V> record)
record - the record; may not be nullvoid close()
close in interface AutoCloseableclose in interface CloseableCopyright © 2020 JBoss by Red Hat. All rights reserved.