Packages

class KafkaConsumer[K, V] extends ReadStream[KafkaConsumerRecord[K, V]]

Vert.x Kafka consumer.

You receive Kafka records by providing a io.vertx.scala.kafka.client.consumer.KafkaConsumer#handler. As messages arrive the handler will be called with the records.

The io.vertx.scala.kafka.client.consumer.KafkaConsumer#pause and io.vertx.scala.kafka.client.consumer.KafkaConsumer#resume provides global control over reading the records from the consumer.

The io.vertx.scala.kafka.client.consumer.KafkaConsumer#pause and io.vertx.scala.kafka.client.consumer.KafkaConsumer#resume provides finer grained control over reading records for specific Topic/Partition, these are Kafka's specific operations.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaConsumer
  2. ReadStream
  3. StreamBase
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KafkaConsumer(_asJava: AnyRef)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[K], arg1: scala.reflect.api.JavaUniverse.TypeTag[V])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asJava: AnyRef
    Definition Classes
    KafkaConsumerReadStreamStreamBase
  6. def assign(topicPartitions: Set[TopicPartition], completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Manually assign a list of partition to this consumer.

    Manually assign a list of partition to this consumer.

    Due to internal buffering of messages, when reassigning the old set of partitions may remain in effect (as observed by the record handler) until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new set of partitions. * @param topicPartitions partitions which want assigned

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  7. def assign(topicPartition: TopicPartition, completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Manually assign a partition to this consumer.

    Manually assign a partition to this consumer.

    Due to internal buffering of messages, when reassigning the old partition may remain in effect (as observed by the record handler) until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new partition. * @param topicPartition partition which want assigned see TopicPartition

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  8. def assign(topicPartitions: Set[TopicPartition]): KafkaConsumer[K, V]

    Manually assign a list of partition to this consumer.

    Manually assign a list of partition to this consumer. * @param topicPartitions partitions which want assigned

    returns

    current KafkaConsumer instance

  9. def assign(topicPartition: TopicPartition): KafkaConsumer[K, V]

    Manually assign a partition to this consumer.

    Manually assign a partition to this consumer. * @param topicPartition partition which want assigned see TopicPartition

    returns

    current KafkaConsumer instance

  10. def assignFuture(topicPartitions: Set[TopicPartition]): Future[Unit]

    Like assign but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  11. def assignFuture(topicPartition: TopicPartition): Future[Unit]

    Like assign but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  12. def assignment(handler: Handler[AsyncResult[Set[TopicPartition]]]): KafkaConsumer[K, V]

    Get the set of partitions currently assigned to this consumer.

    Get the set of partitions currently assigned to this consumer. * @param handler handler called on operation completed

    returns

    current KafkaConsumer instance

  13. def assignmentFuture(): Future[Set[TopicPartition]]

    Like assignment but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  14. def batchHandler(handler: Handler[KafkaConsumerRecords[K, V]]): KafkaConsumer[K, V]

    Set the handler to be used when batches of messages are fetched from the Kafka server.

    Set the handler to be used when batches of messages are fetched from the Kafka server. Batch handlers need to take care not to block the event loop when dealing with large batches. It is better to process records individually using the io.vertx.scala.kafka.client.consumer.KafkaConsumer. * @param handler handler called when batches of messages are fetched

    returns

    current KafkaConsumer instance

  15. def beginningOffsets(topicPartition: TopicPartition, handler: Handler[AsyncResult[Long]]): Unit

    Get the first offset for the given partitions.

    Get the first offset for the given partitions. * @param topicPartition the partition to get the earliest offset. see TopicPartition

    handler

    handler called on operation completed. Returns the earliest available offset for the given partition

  16. def beginningOffsetsFuture(topicPartition: TopicPartition): Future[Long]

    Like beginningOffsets but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  17. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  18. def close(completionHandler: Handler[AsyncResult[Unit]]): Unit

    Close the consumer * @param completionHandler handler called on operation completed

  19. def close(): Unit

    Close the consumer

  20. def closeFuture(): Future[Unit]

    Like close but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  21. def commit(completionHandler: Handler[AsyncResult[Unit]]): Unit

    Commit current offsets for all the subscribed list of topics and partition.

    Commit current offsets for all the subscribed list of topics and partition. * @param completionHandler handler called on operation completed

  22. def commit(): Unit

    Commit current offsets for all the subscribed list of topics and partition.

  23. def commitFuture(): Future[Unit]

    Like commit but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  24. def committed(topicPartition: TopicPartition, handler: Handler[AsyncResult[OffsetAndMetadata]]): Unit

    Get the last committed offset for the given partition (whether the commit happened by this process or another).

    Get the last committed offset for the given partition (whether the commit happened by this process or another). * @param topicPartition topic partition for getting last committed offset see TopicPartition

    handler

    handler called on operation completed

  25. def committedFuture(topicPartition: TopicPartition): Future[OffsetAndMetadata]

    Like committed but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  26. def endHandler(endHandler: Handler[Unit]): KafkaConsumer[K, V]

    Set an end handler.

    Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called. * @return a reference to this, so the API can be used fluently

    Definition Classes
    KafkaConsumerReadStream
  27. def endOffsets(topicPartition: TopicPartition, handler: Handler[AsyncResult[Long]]): Unit

    Get the last offset for the given partition.

    Get the last offset for the given partition. The last offset of a partition is the offset of the upcoming message, i.e. the offset of the last available message + 1. * @param topicPartition the partition to get the end offset. see TopicPartition

    handler

    handler called on operation completed. The end offset for the given partition.

  28. def endOffsetsFuture(topicPartition: TopicPartition): Future[Long]

    Like endOffsets but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  29. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  31. def exceptionHandler(handler: Handler[Throwable]): KafkaConsumer[K, V]

    Set an exception handler on the read stream.

    Set an exception handler on the read stream. * @param handler the exception handler

    returns

    a reference to this, so the API can be used fluently

    Definition Classes
    KafkaConsumerReadStreamStreamBase
  32. def fetch(arg0: Long): ReadStream[KafkaConsumerRecord[K, V]]

    Fetch the specified amount of elements.

    Fetch the specified amount of elements. If the ReadStream has been paused, reading will recommence with the specified amount of items, otherwise the specified amount will be added to the current stream demand. * @return a reference to this, so the API can be used fluently

    Definition Classes
    KafkaConsumerReadStream
  33. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  34. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  35. def handler(handler: Handler[KafkaConsumerRecord[K, V]]): KafkaConsumer[K, V]

    Set a data handler.

    Set a data handler. As data is read, the handler will be called with the data. * @return a reference to this, so the API can be used fluently

    Definition Classes
    KafkaConsumerReadStream
  36. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  39. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  41. def offsetsForTimes(topicPartition: TopicPartition, timestamp: Long, handler: Handler[AsyncResult[OffsetAndTimestamp]]): Unit

    Look up the offset for the given partition by timestamp.

    Look up the offset for the given partition by timestamp. Note: the result might be null in case for the given timestamp no offset can be found -- e.g., when the timestamp refers to the future * @param topicPartition TopicPartition to query. see TopicPartition

    timestamp

    Timestamp to be used in the query.

    handler

    handler called on operation completed

  42. def offsetsForTimesFuture(topicPartition: TopicPartition, timestamp: Long): Future[OffsetAndTimestamp]

    Like offsetsForTimes but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  43. def partitionsAssignedHandler(handler: Handler[Set[TopicPartition]]): KafkaConsumer[K, V]

    Set the handler called when topic partitions are assigned to the consumer * @param handler handler called on assigned topic partitions

    Set the handler called when topic partitions are assigned to the consumer * @param handler handler called on assigned topic partitions

    returns

    current KafkaConsumer instance

  44. def partitionsFor(topic: String, handler: Handler[AsyncResult[Buffer[PartitionInfo]]]): KafkaConsumer[K, V]

    Get metadata about the partitions for a given topic.

    Get metadata about the partitions for a given topic. * @param topic topic partition for which getting partitions info

    handler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  45. def partitionsForFuture(topic: String): Future[Buffer[PartitionInfo]]

    Like partitionsFor but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  46. def partitionsRevokedHandler(handler: Handler[Set[TopicPartition]]): KafkaConsumer[K, V]

    Set the handler called when topic partitions are revoked to the consumer * @param handler handler called on revoked topic partitions

    Set the handler called when topic partitions are revoked to the consumer * @param handler handler called on revoked topic partitions

    returns

    current KafkaConsumer instance

  47. def pause(topicPartitions: Set[TopicPartition], completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Suspend fetching from the requested partitions.

    Suspend fetching from the requested partitions.

    Due to internal buffering of messages, the will continue to observe messages from the given topicPartitions until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will not see messages from the given topicPartitions. * @param topicPartitions topic partition from which suspend fetching

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  48. def pause(topicPartition: TopicPartition, completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Suspend fetching from the requested partition.

    Suspend fetching from the requested partition.

    Due to internal buffering of messages, the will continue to observe messages from the given topicPartition until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will not see messages from the given topicPartition. * @param topicPartition topic partition from which suspend fetching see TopicPartition

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  49. def pause(topicPartitions: Set[TopicPartition]): KafkaConsumer[K, V]

    Suspend fetching from the requested partitions.

    Suspend fetching from the requested partitions. * @param topicPartitions topic partition from which suspend fetching

    returns

    current KafkaConsumer instance

  50. def pause(topicPartition: TopicPartition): KafkaConsumer[K, V]

    Suspend fetching from the requested partition.

    Suspend fetching from the requested partition. * @param topicPartition topic partition from which suspend fetching see TopicPartition

    returns

    current KafkaConsumer instance

  51. def pause(): KafkaConsumer[K, V]

    Pause the ReadStream, it sets the buffer in fetch mode and clears the actual demand.

    Pause the ReadStream, it sets the buffer in fetch mode and clears the actual demand.

    While it's paused, no data will be sent to the data handler. * @return a reference to this, so the API can be used fluently

    Definition Classes
    KafkaConsumerReadStream
  52. def pauseFuture(topicPartitions: Set[TopicPartition]): Future[Unit]

    Like pause but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  53. def pauseFuture(topicPartition: TopicPartition): Future[Unit]

    Like pause but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  54. def paused(handler: Handler[AsyncResult[Set[TopicPartition]]]): Unit

    Get the set of partitions that were previously paused by a call to pause(Set).

    Get the set of partitions that were previously paused by a call to pause(Set). * @param handler handler called on operation completed

  55. def pausedFuture(): Future[Set[TopicPartition]]

    Like paused but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  56. def poll(timeout: Long, handler: Handler[AsyncResult[KafkaConsumerRecords[K, V]]]): Unit

    Executes a poll for getting messages from Kafka * @param timeout The time, in milliseconds, spent waiting in poll if data is not available in the buffer.

    Executes a poll for getting messages from Kafka * @param timeout The time, in milliseconds, spent waiting in poll if data is not available in the buffer. If 0, returns immediately with any records that are available currently in the native Kafka consumer's buffer, else returns empty. Must not be negative.

    handler

    handler called after the poll with batch of records (can be empty).

  57. def pollFuture(timeout: Long): Future[KafkaConsumerRecords[K, V]]

    Like poll but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  58. def pollTimeout(timeout: Long): KafkaConsumer[K, V]

    Sets the poll timeout (in ms) for the underlying native Kafka Consumer.

    Sets the poll timeout (in ms) for the underlying native Kafka Consumer. Defaults to 1000. Setting timeout to a lower value results in a more 'responsive' client, because it will block for a shorter period if no data is available in the assigned partition and therefore allows subsequent actions to be executed with a shorter delay. At the same time, the client will poll more frequently and thus will potentially create a higher load on the Kafka Broker. * @param timeout The time, in milliseconds, spent waiting in poll if data is not available in the buffer. If 0, returns immediately with any records that are available currently in the native Kafka consumer's buffer, else returns empty. Must not be negative.

  59. def position(partition: TopicPartition, handler: Handler[AsyncResult[Long]]): Unit

    Get the offset of the next record that will be fetched (if a record with that offset exists).

    Get the offset of the next record that will be fetched (if a record with that offset exists). * @param partition The partition to get the position for see TopicPartition

    handler

    handler called on operation completed

  60. def positionFuture(partition: TopicPartition): Future[Long]

    Like position but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  61. def resume(topicPartitions: Set[TopicPartition], completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Resume specified partitions which have been paused with pause.

    Resume specified partitions which have been paused with pause. * @param topicPartitions topic partition from which resume fetching

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  62. def resume(topicPartition: TopicPartition, completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Resume specified partition which have been paused with pause.

    Resume specified partition which have been paused with pause. * @param topicPartition topic partition from which resume fetching see TopicPartition

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  63. def resume(topicPartitions: Set[TopicPartition]): KafkaConsumer[K, V]

    Resume specified partitions which have been paused with pause.

    Resume specified partitions which have been paused with pause. * @param topicPartitions topic partition from which resume fetching

    returns

    current KafkaConsumer instance

  64. def resume(topicPartition: TopicPartition): KafkaConsumer[K, V]

    Resume specified partition which have been paused with pause.

    Resume specified partition which have been paused with pause. * @param topicPartition topic partition from which resume fetching see TopicPartition

    returns

    current KafkaConsumer instance

  65. def resume(): KafkaConsumer[K, V]

    Resume reading, and sets the buffer in flowing mode.

    Resume reading, and sets the buffer in flowing mode.

    If the ReadStream has been paused, reading will recommence on it. * @return a reference to this, so the API can be used fluently

    Definition Classes
    KafkaConsumerReadStream
  66. def resumeFuture(topicPartitions: Set[TopicPartition]): Future[Unit]

    Like resume but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  67. def resumeFuture(topicPartition: TopicPartition): Future[Unit]

    Like resume but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  68. def seek(topicPartition: TopicPartition, offset: Long, completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Overrides the fetch offsets that the consumer will use on the next poll.

    Overrides the fetch offsets that the consumer will use on the next poll.

    Due to internal buffering of messages, the will continue to observe messages fetched with respect to the old offset until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new offset. * @param topicPartition topic partition for which seek see TopicPartition

    offset

    offset to seek inside the topic partition

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  69. def seek(topicPartition: TopicPartition, offset: Long): KafkaConsumer[K, V]

    Overrides the fetch offsets that the consumer will use on the next poll.

    Overrides the fetch offsets that the consumer will use on the next poll. * @param topicPartition topic partition for which seek see TopicPartition

    offset

    offset to seek inside the topic partition

    returns

    current KafkaConsumer instance

  70. def seekFuture(topicPartition: TopicPartition, offset: Long): Future[Unit]

    Like seek but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  71. def seekToBeginning(topicPartitions: Set[TopicPartition], completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Seek to the first offset for each of the given partitions.

    Seek to the first offset for each of the given partitions.

    Due to internal buffering of messages, the will continue to observe messages fetched with respect to the old offset until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new offset. * @param topicPartitions topic partition for which seek

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  72. def seekToBeginning(topicPartition: TopicPartition, completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Seek to the first offset for each of the given partition.

    Seek to the first offset for each of the given partition.

    Due to internal buffering of messages, the will continue to observe messages fetched with respect to the old offset until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new offset. * @param topicPartition topic partition for which seek see TopicPartition

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  73. def seekToBeginning(topicPartitions: Set[TopicPartition]): KafkaConsumer[K, V]

    Seek to the first offset for each of the given partitions.

    Seek to the first offset for each of the given partitions. * @param topicPartitions topic partition for which seek

    returns

    current KafkaConsumer instance

  74. def seekToBeginning(topicPartition: TopicPartition): KafkaConsumer[K, V]

    Seek to the first offset for each of the given partition.

    Seek to the first offset for each of the given partition. * @param topicPartition topic partition for which seek see TopicPartition

    returns

    current KafkaConsumer instance

  75. def seekToBeginningFuture(topicPartitions: Set[TopicPartition]): Future[Unit]

    Like seekToBeginning but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  76. def seekToBeginningFuture(topicPartition: TopicPartition): Future[Unit]

    Like seekToBeginning but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  77. def seekToEnd(topicPartitions: Set[TopicPartition], completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Seek to the last offset for each of the given partitions.

    Seek to the last offset for each of the given partitions.

    Due to internal buffering of messages, the will continue to observe messages fetched with respect to the old offset until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new offset. * @param topicPartitions topic partition for which seek

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  78. def seekToEnd(topicPartition: TopicPartition, completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Seek to the last offset for each of the given partition.

    Seek to the last offset for each of the given partition.

    Due to internal buffering of messages, the will continue to observe messages fetched with respect to the old offset until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new offset. * @param topicPartition topic partition for which seek see TopicPartition

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  79. def seekToEnd(topicPartitions: Set[TopicPartition]): KafkaConsumer[K, V]

    Seek to the last offset for each of the given partitions.

    Seek to the last offset for each of the given partitions. * @param topicPartitions topic partition for which seek

    returns

    current KafkaConsumer instance

  80. def seekToEnd(topicPartition: TopicPartition): KafkaConsumer[K, V]

    Seek to the last offset for each of the given partition.

    Seek to the last offset for each of the given partition. * @param topicPartition topic partition for which seek see TopicPartition

    returns

    current KafkaConsumer instance

  81. def seekToEndFuture(topicPartitions: Set[TopicPartition]): Future[Unit]

    Like seekToEnd but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  82. def seekToEndFuture(topicPartition: TopicPartition): Future[Unit]

    Like seekToEnd but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  83. def subscribe(topics: Set[String], completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Subscribe to the given list of topics to get dynamically assigned partitions.

    Subscribe to the given list of topics to get dynamically assigned partitions.

    Due to internal buffering of messages, when changing the subscribed topics the old set of topics may remain in effect (as observed by the record handler) until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new set of topics. * @param topics topics to subscribe to

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  84. def subscribe(topic: String, completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Subscribe to the given topic to get dynamically assigned partitions.

    Subscribe to the given topic to get dynamically assigned partitions.

    Due to internal buffering of messages, when changing the subscribed topic the old topic may remain in effect (as observed by the record handler) until some time after the given completionHandler is called. In contrast, the once the given completionHandler is called the io.vertx.scala.kafka.client.consumer.KafkaConsumer#batchHandler will only see messages consistent with the new topic. * @param topic topic to subscribe to

    completionHandler

    handler called on operation completed

    returns

    current KafkaConsumer instance

  85. def subscribe(topics: Set[String]): KafkaConsumer[K, V]

    Subscribe to the given list of topics to get dynamically assigned partitions.

    Subscribe to the given list of topics to get dynamically assigned partitions. * @param topics topics to subscribe to

    returns

    current KafkaConsumer instance

  86. def subscribe(topic: String): KafkaConsumer[K, V]

    Subscribe to the given topic to get dynamically assigned partitions.

    Subscribe to the given topic to get dynamically assigned partitions. * @param topic topic to subscribe to

    returns

    current KafkaConsumer instance

  87. def subscribeFuture(topics: Set[String]): Future[Unit]

    Like subscribe but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  88. def subscribeFuture(topic: String): Future[Unit]

    Like subscribe but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  89. def subscription(handler: Handler[AsyncResult[Set[String]]]): KafkaConsumer[K, V]

    Get the current subscription.

    Get the current subscription. * @param handler handler called on operation completed

    returns

    current KafkaConsumer instance

  90. def subscriptionFuture(): Future[Set[String]]

    Like subscription but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  91. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  92. def toString(): String
    Definition Classes
    AnyRef → Any
  93. def unsubscribe(completionHandler: Handler[AsyncResult[Unit]]): KafkaConsumer[K, V]

    Unsubscribe from topics currently subscribed with subscribe.

    Unsubscribe from topics currently subscribed with subscribe. * @param completionHandler handler called on operation completed

    returns

    current KafkaConsumer instance

  94. def unsubscribe(): KafkaConsumer[K, V]

    Unsubscribe from topics currently subscribed with subscribe.

    Unsubscribe from topics currently subscribed with subscribe. * @return current KafkaConsumer instance

  95. def unsubscribeFuture(): Future[Unit]

    Like unsubscribe but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

  96. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  97. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  98. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from ReadStream[KafkaConsumerRecord[K, V]]

Inherited from StreamBase

Inherited from AnyRef

Inherited from Any

Ungrouped