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.
KafkaProducer(delegate: KafkaProducer<Any, Any>)KafkaProducer(delegate: KafkaProducer<Any, Any>, typeArg_0: TypeArg<K>, typeArg_1: TypeArg<V>) |
static val __TYPE_ARG: TypeArg<KafkaProducer<Any, Any>> |
|
val __typeArg_0: TypeArg<K> |
|
val __typeArg_1: TypeArg<V> |
open fun close(): Unitopen fun close(completionHandler: Handler<AsyncResult<Void>>): Unitopen fun close(timeout: Long, completionHandler: Handler<AsyncResult<Void>>): Unit
Close the producer |
|
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 |
|
open static fun <K : Any, V : Any> createShared(: Vertx, : String, : MutableMap<String, String>): KafkaProducer<K, V>open static fun <K : Any, V : Any> createShared(: Vertx, : String, : MutableMap<String, String>, : Class<K>, : Class<V>): KafkaProducer<K, V>
Get or create a KafkaProducer instance which shares its stream with any other KafkaProducer created with the same |
|
open fun drainHandler(handler: Handler<Void>): KafkaProducer<K, V> |
|
open fun end(): Unitopen fun end(kafkaProducerRecord: KafkaProducerRecord<K, V>): Unit |
|
open fun equals(other: Any?): Boolean |
|
open fun exceptionHandler(handler: Handler<Throwable>): KafkaProducer<K, V> |
|
open fun flush(completionHandler: Handler<Void>): KafkaProducer<K, V>
Invoking this method makes all buffered records immediately available to write |
|
open fun getDelegate(): KafkaProducer<Any, Any> |
|
open fun hashCode(): Int |
|
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> |
|
open fun partitionsFor(topic: String, handler: Handler<AsyncResult<MutableList<PartitionInfo>>>): KafkaProducer<K, V>
Get the partition metadata for the give topic. |
|
open fun rxClose(): Single<Void>open fun rxClose(timeout: Long): Single<Void>
Close the producer |
|
open fun rxPartitionsFor(topic: String): Single<MutableList<PartitionInfo>>
Get the partition metadata for the give topic. |
|
open fun rxWrite(record: KafkaProducerRecord<K, V>): Single<RecordMetadata>
Asynchronously write a record to a topic |
|
open fun setWriteQueueMaxSize(i: Int): KafkaProducer<K, V> |
|
open fun toString(): String |
|
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 |
|
open fun writeQueueFull(): Boolean |