Class KafkaProducer<K, V>
Methods
abortTransaction
- abortTransaction(): PromiseLike<void>
- abortTransaction(handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): KafkaProducer<K, V>
-
Returns PromiseLike<void>
-
Parameters
-
handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
beginTransaction
- beginTransaction(): PromiseLike<void>
- beginTransaction(handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): KafkaProducer<K, V>
-
Returns PromiseLike<void>
-
Parameters
-
handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
close
- close(): PromiseLike<void>
- close(completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
- close(timeout: number): PromiseLike<void>
- close(timeout: number, completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
-
Returns PromiseLike<void>
-
Parameters
-
completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
Returns void
-
Parameters
Returns PromiseLike<void>
-
Parameters
-
timeout: number
-
completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
Returns void
commitTransaction
- commitTransaction(): PromiseLike<void>
- commitTransaction(handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): KafkaProducer<K, V>
-
Returns PromiseLike<void>
-
Parameters
-
handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
drainHandler
- drainHandler(handler: ((res: void) => void) | Handler<void> | null | undefined): KafkaProducer<K, V>
-
Parameters
-
handler: ((res: void) => void) | Handler<void> | null | undefined
end
- end(): PromiseLike<void>
- end(arg0: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
- end(data: KafkaProducerRecord<K, V>): PromiseLike<void>
- end(data: KafkaProducerRecord<K, V>, handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): void
-
Returns PromiseLike<void>
-
Parameters
-
arg0: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
Returns void
-
Parameters
Returns PromiseLike<void>
-
Parameters
-
-
handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
Returns void
exceptionHandler
- exceptionHandler(handler: ((res: Throwable) => void) | Handler<Throwable> | null | undefined): KafkaProducer<K, V>
-
Parameters
-
handler: ((res: Throwable) => void) | Handler<Throwable> | null | undefined
flush
- flush(): PromiseLike<void>
- flush(completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): KafkaProducer<K, V>
-
Returns PromiseLike<void>
-
Parameters
-
completionHandler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
initTransactions
- initTransactions(): PromiseLike<void>
- initTransactions(handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>): KafkaProducer<K, V>
-
Returns PromiseLike<void>
-
Parameters
-
handler: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
partitionsFor
-
Parameters
-
Parameters
send
-
Parameters
-
Parameters
setWriteQueueMaxSize
-
Parameters
write
-
Parameters
Returns PromiseLike<void>
-
Parameters
-
-
arg1: ((res: AsyncResult<void>) => void) | Handler<AsyncResult<void>>
Returns void
writeQueueFull
- writeQueueFull(): boolean
-
Returns boolean
Static create
- create<K, V>(vertx: Vertx, config: {}): KafkaProducer<K, V>
- create<K, V>(vertx: Vertx, config: {}, keyType: any, valueType: any): KafkaProducer<K, V>
-
Type parameters
Parameters
-
Type parameters
Parameters
-
vertx: Vertx
-
config: {}
-
keyType: any
-
valueType: any
Static createShared
- createShared<K, V>(vertx: Vertx, name: string, config: {}): KafkaProducer<K, V>
- createShared<K, V>(vertx: Vertx, name: string, options: KafkaClientOptions): KafkaProducer<K, V>
- createShared<K, V>(vertx: Vertx, name: string, config: {}, keyType: any, valueType: any): KafkaProducer<K, V>
- createShared<K, V>(vertx: Vertx, name: string, options: KafkaClientOptions, keyType: any, valueType: any): KafkaProducer<K, V>
-
Type parameters
Parameters
-
vertx: Vertx
-
name: string
-
config: {}
-
Type parameters
Parameters
-
vertx: Vertx
-
name: string
-
-
Type parameters
Parameters
-
vertx: Vertx
-
name: string
-
config: {}
-
keyType: any
-
valueType: any
-
Type parameters
Parameters
-
vertx: Vertx
-
name: string
-
-
keyType: any
-
valueType: any
Vert.x Kafka producer.
The {@link WriteStream#write} provides global control over writing a record.