vertx / io.vertx.reactivex.kafka.client.producer / KafkaProducer

# KafkaProducer

`open class KafkaProducer<K : Any, V : Any> : WriteStream<KafkaProducerRecord<K, V>>`

Vert.x Kafka producer.

The provides global control over writing a record.

NOTE: This class has been automatically generated from the io.vertx.kafka.client.producer.KafkaProducer non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `KafkaProducer(delegate: KafkaProducer<Any, Any>)` `KafkaProducer(delegate: KafkaProducer<Any, Any>, typeArg_0: TypeArg<K>, typeArg_1: TypeArg<V>)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<KafkaProducer<Any, Any>>`
__typeArg_0 | `val __typeArg_0: TypeArg<K>`
__typeArg_1 | `val __typeArg_1: TypeArg<V>`

### Functions

close | `open fun close(): Unit` `open fun close(completionHandler: Handler<AsyncResult<Void>>): Unit` `open fun close(timeout: Long, completionHandler: Handler<AsyncResult<Void>>): Unit` Close the producer
create | `open static fun <K : Any, V : Any> create(vertx: Vertx, config: MutableMap<String, String>): KafkaProducer<K, V>` `open static fun <K : Any, V : Any> create(vertx: Vertx, config: MutableMap<String, String>, keyType: Class<K>, valueType: Class<V>): KafkaProducer<K, V>` Create a new KafkaProducer instance
createShared | `open static fun <K : Any, V : Any> createShared(vertx: Vertx, name: String, config: MutableMap<String, String>): KafkaProducer<K, V>` `open static fun <K : Any, V : Any> createShared(vertx: Vertx, name: String, config: MutableMap<String, String>, keyType: Class<K>, valueType: Class<V>): KafkaProducer<K, V>` Get or create a KafkaProducer instance which shares its stream with any other KafkaProducer created with the same `name`
drainHandler | `open fun drainHandler(handler: Handler<Void>): KafkaProducer<K, V>`
end | `open fun end(): Unit` `open fun end(kafkaProducerRecord: KafkaProducerRecord<K, V>): Unit`
equals | `open fun equals(other: Any?): Boolean`
exceptionHandler | `open fun exceptionHandler(handler: Handler<Throwable>): KafkaProducer<K, V>`
flush | `open fun flush(completionHandler: Handler<Void>): KafkaProducer<K, V>` Invoking this method makes all buffered records immediately available to write
getDelegate | `open fun getDelegate(): KafkaProducer<Any, Any>`
hashCode | `open fun hashCode(): Int`
newInstance | `open static fun <K : Any, V : Any> newInstance(arg: KafkaProducer<Any, Any>): KafkaProducer<K, V>` `open static fun <K : Any, V : Any> newInstance(arg: KafkaProducer<Any, Any>, __typeArg_K: TypeArg<K>, __typeArg_V: TypeArg<V>): KafkaProducer<K, V>`
partitionsFor | `open fun partitionsFor(topic: String, handler: Handler<AsyncResult<MutableList<PartitionInfo>>>): KafkaProducer<K, V>` Get the partition metadata for the give topic.
rxClose | `open fun rxClose(): Completable` `open fun rxClose(timeout: Long): Completable` Close the producer
rxPartitionsFor | `open fun rxPartitionsFor(topic: String): Single<MutableList<PartitionInfo>>` Get the partition metadata for the give topic.
rxWrite | `open fun rxWrite(record: KafkaProducerRecord<K, V>): Single<RecordMetadata>` Asynchronously write a record to a topic
setWriteQueueMaxSize | `open fun setWriteQueueMaxSize(i: Int): KafkaProducer<K, V>`
toString | `open fun toString(): String`
write | `open fun write(kafkaProducerRecord: KafkaProducerRecord<K, V>): KafkaProducer<K, V>``open fun write(record: KafkaProducerRecord<K, V>, handler: Handler<AsyncResult<RecordMetadata>>): KafkaProducer<K, V>` Asynchronously write a record to a topic
writeQueueFull | `open fun writeQueueFull(): Boolean`