class KafkaProducer[K, V] extends WriteStream[KafkaProducerRecord[K, V]]
Vert.x Kafka producer.
The provides global control over writing a record.
- Alphabetic
- By Inheritance
- KafkaProducer
- WriteStream
- StreamBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new KafkaProducer(_asJava: AnyRef)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asJava: AnyRef
- Definition Classes
- KafkaProducer → WriteStream → StreamBase
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(timeout: Long, completionHandler: Handler[AsyncResult[Unit]]): Unit
Close the producer
Close the producer
- timeout
timeout to wait for closing
- completionHandler
handler called on operation completed
-
def
close(completionHandler: Handler[AsyncResult[Unit]]): Unit
Close the producer
Close the producer
- completionHandler
handler called on operation completed
-
def
close(): Unit
Close the producer
-
def
closeFuture(timeout: Long): Future[Unit]
Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
closeFuture(): Future[Unit]
Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
drainHandler(handler: Handler[Unit]): KafkaProducer[K, V]
- Definition Classes
- KafkaProducer → WriteStream
-
def
end(kafkaProducerRecord: KafkaProducerRecord[K, V]): Unit
- Definition Classes
- KafkaProducer → WriteStream
-
def
end(): Unit
- Definition Classes
- KafkaProducer → WriteStream
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exceptionHandler(handler: Handler[Throwable]): KafkaProducer[K, V]
- Definition Classes
- KafkaProducer → WriteStream → StreamBase
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flush(completionHandler: Handler[Unit]): KafkaProducer[K, V]
Invoking this method makes all buffered records immediately available to write
Invoking this method makes all buffered records immediately available to write
- completionHandler
handler called on operation completed
- returns
current KafkaProducer instance
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
partitionsFor(topic: String, handler: Handler[AsyncResult[Buffer[PartitionInfo]]]): KafkaProducer[K, V]
Get the partition metadata for the give topic.
Get the partition metadata for the give topic.
- topic
topic partition for which getting partitions info
- handler
handler called on operation completed
- returns
current KafkaProducer instance
-
def
partitionsForFuture(topic: String): Future[Buffer[PartitionInfo]]
Like partitionsFor but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
setWriteQueueMaxSize(i: Int): KafkaProducer[K, V]
- Definition Classes
- KafkaProducer → WriteStream
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
write(record: KafkaProducerRecord[K, V], handler: Handler[AsyncResult[RecordMetadata]]): KafkaProducer[K, V]
Asynchronously write a record to a topic
Asynchronously write a record to a topic
- record
record to write
- handler
handler called on operation completed
- returns
current KafkaWriteStream instance
-
def
write(kafkaProducerRecord: KafkaProducerRecord[K, V]): KafkaProducer[K, V]
- Definition Classes
- KafkaProducer → WriteStream
-
def
writeFuture(record: KafkaProducerRecord[K, V]): Future[RecordMetadata]
Like write but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.
-
def
writeQueueFull(): Boolean
- Definition Classes
- KafkaProducer → WriteStream