io.vertx.rxjava.kafka.client.consumer

## Class KafkaConsumer<K,V>

- java.lang.Object
- - io.vertx.rxjava.kafka.client.consumer.KafkaConsumer<K,V>

- All Implemented Interfaces:
    ReadStream<KafkaConsumerRecord<K,V>>, StreamBase

      public class KafkaConsumer<K,V>
      extends Object
      implements ReadStream<KafkaConsumerRecord<K,V>>

  Vert.x Kafka consumer.

  You receive Kafka records by providing a `handler(io.vertx.core.Handler<io.vertx.rxjava.kafka.client.consumer.KafkaConsumerRecord<K, V>>)`. As messages arrive the handler will be called with the records.

  The `pause()` and `resume()` provides global control over reading the records from the consumer.

  The `pause()` and `resume()` provides finer grained control over reading records for specific Topic/Partition, these are Kafka's specific operations.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TypeArg<KafkaConsumer>` | `__TYPE_ARG`
    `TypeArg<K>` | `__typeArg_0`
    `TypeArg<V>` | `__typeArg_1`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KafkaConsumer(KafkaConsumer delegate)`
    `KafkaConsumer(KafkaConsumer delegate, TypeArg<K> typeArg_0, TypeArg<V> typeArg_1)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `KafkaConsumer<K,V>` | `assign(Set<TopicPartition> topicPartitions)` Manually assign a list of partition to this consumer.
    `KafkaConsumer<K,V>` | `assign(Set<TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)` Manually assign a list of partition to this consumer.
    `KafkaConsumer<K,V>` | `assign(TopicPartition topicPartition)` Manually assign a partition to this consumer.
    `KafkaConsumer<K,V>` | `assign(TopicPartition topicPartition, Handler<AsyncResult<Void>> completionHandler)` Manually assign a partition to this consumer.
    `KafkaConsumer<K,V>` | `assignment(Handler<AsyncResult<Set<TopicPartition>>> handler)` Get the set of partitions currently assigned to this consumer.
    `void` | `close()` Close the consumer
    `void` | `close(Handler<AsyncResult<Void>> completionHandler)` Close the consumer
    `void` | `commit()` Commit current offsets for all the subscribed list of topics and partition.
    `void` | `commit(Handler<AsyncResult<Void>> completionHandler)` Commit current offsets for all the subscribed list of topics and partition.
    `void` | `committed(TopicPartition topicPartition, Handler<AsyncResult<OffsetAndMetadata>> handler)` Get the last committed offset for the given partition (whether the commit happened by this process or another).
    `static <K,V> KafkaConsumer<K,V>` | `create(Vertx vertx, Map<String,String> config)` Create a new KafkaConsumer instance
    `static <K,V> KafkaConsumer<K,V>` | `create(Vertx vertx, Map<String,String> config, Class<K> keyType, Class<V> valueType)` Create a new KafkaConsumer instance
    `KafkaConsumer<K,V>` | `endHandler(Handler<Void> endHandler)` Set an end handler.
    `KafkaConsumer<K,V>` | `exceptionHandler(Handler<Throwable> handler)` Set an exception handler on the read stream.
    `KafkaConsumer` | `getDelegate()`
    `KafkaConsumer<K,V>` | `handler(Handler<KafkaConsumerRecord<K,V>> handler)` Set a data handler.
    `static <K,V> KafkaConsumer` | `newInstance(KafkaConsumer arg)`
    `static <K,V> KafkaConsumer` | `newInstance(KafkaConsumer arg, TypeArg<K> __typeArg_K, TypeArg<V> __typeArg_V)`
    `KafkaConsumer<K,V>` | `partitionsAssignedHandler(Handler<Set<TopicPartition>> handler)` Set the handler called when topic partitions are assigned to the consumer
    `KafkaConsumer<K,V>` | `partitionsFor(String topic, Handler<AsyncResult<List<PartitionInfo>>> handler)` Get metadata about the partitions for a given topic.
    `KafkaConsumer<K,V>` | `partitionsRevokedHandler(Handler<Set<TopicPartition>> handler)` Set the handler called when topic partitions are revoked to the consumer
    `KafkaConsumer<K,V>` | `pause()` Pause the `ReadSupport`.
    `KafkaConsumer<K,V>` | `pause(Set<TopicPartition> topicPartitions)` Suspend fetching from the requested partitions.
    `KafkaConsumer<K,V>` | `pause(Set<TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)` Suspend fetching from the requested partitions.
    `KafkaConsumer<K,V>` | `pause(TopicPartition topicPartition)` Suspend fetching from the requested partition.
    `KafkaConsumer<K,V>` | `pause(TopicPartition topicPartition, Handler<AsyncResult<Void>> completionHandler)` Suspend fetching from the requested partition.
    `void` | `paused(Handler<AsyncResult<Set<TopicPartition>>> handler)` Get the set of partitions that were previously paused by a call to pause(Set).
    `void` | `position(TopicPartition partition, Handler<AsyncResult<Long>> handler)` Get the offset of the next record that will be fetched (if a record with that offset exists).
    `KafkaConsumer<K,V>` | `resume()` Resume reading.
    `KafkaConsumer<K,V>` | `resume(Set<TopicPartition> topicPartitions)` Resume specified partitions which have been paused with pause.
    `KafkaConsumer<K,V>` | `resume(Set<TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)` Resume specified partitions which have been paused with pause.
    `KafkaConsumer<K,V>` | `resume(TopicPartition topicPartition)` Resume specified partition which have been paused with pause.
    `KafkaConsumer<K,V>` | `resume(TopicPartition topicPartition, Handler<AsyncResult<Void>> completionHandler)` Resume specified partition which have been paused with pause.
    `rx.Single<Void>` | `rxAssign(Set<TopicPartition> topicPartitions)` Manually assign a list of partition to this consumer.
    `rx.Single<Void>` | `rxAssign(TopicPartition topicPartition)` Manually assign a partition to this consumer.
    `rx.Single<Set<TopicPartition>>` | `rxAssignment()` Get the set of partitions currently assigned to this consumer.
    `rx.Single<Void>` | `rxClose()` Close the consumer
    `rx.Single<Void>` | `rxCommit()` Commit current offsets for all the subscribed list of topics and partition.
    `rx.Single<OffsetAndMetadata>` | `rxCommitted(TopicPartition topicPartition)` Get the last committed offset for the given partition (whether the commit happened by this process or another).
    `rx.Single<List<PartitionInfo>>` | `rxPartitionsFor(String topic)` Get metadata about the partitions for a given topic.
    `rx.Single<Void>` | `rxPause(Set<TopicPartition> topicPartitions)` Suspend fetching from the requested partitions.
    `rx.Single<Void>` | `rxPause(TopicPartition topicPartition)` Suspend fetching from the requested partition.
    `rx.Single<Set<TopicPartition>>` | `rxPaused()` Get the set of partitions that were previously paused by a call to pause(Set).
    `rx.Single<Long>` | `rxPosition(TopicPartition partition)` Get the offset of the next record that will be fetched (if a record with that offset exists).
    `rx.Single<Void>` | `rxResume(Set<TopicPartition> topicPartitions)` Resume specified partitions which have been paused with pause.
    `rx.Single<Void>` | `rxResume(TopicPartition topicPartition)` Resume specified partition which have been paused with pause.
    `rx.Single<Void>` | `rxSeek(TopicPartition topicPartition, long offset)` Overrides the fetch offsets that the consumer will use on the next poll.
    `rx.Single<Void>` | `rxSeekToBeginning(Set<TopicPartition> topicPartitions)` Seek to the first offset for each of the given partitions.
    `rx.Single<Void>` | `rxSeekToBeginning(TopicPartition topicPartition)` Seek to the first offset for each of the given partition.
    `rx.Single<Void>` | `rxSeekToEnd(Set<TopicPartition> topicPartitions)` Seek to the last offset for each of the given partitions.
    `rx.Single<Void>` | `rxSeekToEnd(TopicPartition topicPartition)` Seek to the last offset for each of the given partition.
    `rx.Single<Void>` | `rxSubscribe(Set<String> topics)` Subscribe to the given list of topics to get dynamically assigned partitions.
    `rx.Single<Void>` | `rxSubscribe(String topic)` Subscribe to the given topic to get dynamically assigned partitions.
    `rx.Single<Set<String>>` | `rxSubscription()` Get the current subscription.
    `rx.Single<Void>` | `rxUnsubscribe()` Unsubscribe from topics currently subscribed with subscribe.
    `KafkaConsumer<K,V>` | `seek(TopicPartition topicPartition, long offset)` Overrides the fetch offsets that the consumer will use on the next poll.
    `KafkaConsumer<K,V>` | `seek(TopicPartition topicPartition, long offset, Handler<AsyncResult<Void>> completionHandler)` Overrides the fetch offsets that the consumer will use on the next poll.
    `KafkaConsumer<K,V>` | `seekToBeginning(Set<TopicPartition> topicPartitions)` Seek to the first offset for each of the given partitions.
    `KafkaConsumer<K,V>` | `seekToBeginning(Set<TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)` Seek to the first offset for each of the given partitions.
    `KafkaConsumer<K,V>` | `seekToBeginning(TopicPartition topicPartition)` Seek to the first offset for each of the given partition.
    `KafkaConsumer<K,V>` | `seekToBeginning(TopicPartition topicPartition, Handler<AsyncResult<Void>> completionHandler)` Seek to the first offset for each of the given partition.
    `KafkaConsumer<K,V>` | `seekToEnd(Set<TopicPartition> topicPartitions)` Seek to the last offset for each of the given partitions.
    `KafkaConsumer<K,V>` | `seekToEnd(Set<TopicPartition> topicPartitions, Handler<AsyncResult<Void>> completionHandler)` Seek to the last offset for each of the given partitions.
    `KafkaConsumer<K,V>` | `seekToEnd(TopicPartition topicPartition)` Seek to the last offset for each of the given partition.
    `KafkaConsumer<K,V>` | `seekToEnd(TopicPartition topicPartition, Handler<AsyncResult<Void>> completionHandler)` Seek to the last offset for each of the given partition.
    `KafkaConsumer<K,V>` | `subscribe(Set<String> topics)` Subscribe to the given list of topics to get dynamically assigned partitions.
    `KafkaConsumer<K,V>` | `subscribe(Set<String> topics, Handler<AsyncResult<Void>> completionHandler)` Subscribe to the given list of topics to get dynamically assigned partitions.
    `KafkaConsumer<K,V>` | `subscribe(String topic)` Subscribe to the given topic to get dynamically assigned partitions.
    `KafkaConsumer<K,V>` | `subscribe(String topic, Handler<AsyncResult<Void>> completionHandler)` Subscribe to the given topic to get dynamically assigned partitions.
    `KafkaConsumer<K,V>` | `subscription(Handler<AsyncResult<Set<String>>> handler)` Get the current subscription.
    `rx.Observable<KafkaConsumerRecord<K,V>>` | `toObservable()`
    `KafkaConsumer<K,V>` | `unsubscribe()` Unsubscribe from topics currently subscribed with subscribe.
    `KafkaConsumer<K,V>` | `unsubscribe(Handler<AsyncResult<Void>> completionHandler)` Unsubscribe from topics currently subscribed with subscribe.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.rxjava.core.streams.ReadStream

      `newInstance, newInstance`

    - ### Methods inherited from interface io.vertx.rxjava.core.streams.StreamBase

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final TypeArg<KafkaConsumer> __TYPE_ARG

    - #### __typeArg_0

          public final TypeArg<K> __typeArg_0

    - #### __typeArg_1

          public final TypeArg<V> __typeArg_1

  - ### Constructor Detail

    - #### KafkaConsumer

          public KafkaConsumer(KafkaConsumer delegate)

    - #### KafkaConsumer

          public KafkaConsumer(KafkaConsumer delegate,
                               TypeArg<K> typeArg_0,
                               TypeArg<V> typeArg_1)

  - ### Method Detail

    - #### getDelegate

          public KafkaConsumer getDelegate()

      Specified by:
        `getDelegate` in interface `ReadStream<KafkaConsumerRecord<K,V>>`
      Specified by:
        `getDelegate` in interface `StreamBase`

    - #### toObservable

          public rx.Observable<KafkaConsumerRecord<K,V>> toObservable()

      Specified by:
        `toObservable` in interface `ReadStream<KafkaConsumerRecord<K,V>>`

    - #### create

          public static <K,V> KafkaConsumer<K,V> create(Vertx vertx,
                                                        Map<String,String> config)

      Create a new KafkaConsumer instance
      Parameters:
        `vertx` - Vert.x instance to use
        `config` - Kafka producer configuration
      Returns:
        an instance of the KafkaConsumer

    - #### create

          public static <K,V> KafkaConsumer<K,V> create(Vertx vertx,
                                                        Map<String,String> config,
                                                        Class<K> keyType,
                                                        Class<V> valueType)

      Create a new KafkaConsumer instance
      Parameters:
        `vertx` - Vert.x instance to use
        `config` - Kafka consumer configuration
        `keyType` - class type for the key deserialization
        `valueType` - class type for the value deserialization
      Returns:
        an instance of the KafkaConsumer

    - #### exceptionHandler

          public KafkaConsumer<K,V> exceptionHandler(Handler<Throwable> handler)

      Description copied from interface: `ReadStream`
      Set an exception handler on the read stream.
      Specified by:
        `exceptionHandler` in interface `ReadStream<KafkaConsumerRecord<K,V>>`
      Specified by:
        `exceptionHandler` in interface `StreamBase`
      Parameters:
        `handler` - the exception handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### handler

          public KafkaConsumer<K,V> handler(Handler<KafkaConsumerRecord<K,V>> handler)

      Description copied from interface: `ReadStream`
      Set a data handler. As data is read, the handler will be called with the data.
      Specified by:
        `handler` in interface `ReadStream<KafkaConsumerRecord<K,V>>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### pause

          public KafkaConsumer<K,V> pause()

      Description copied from interface: `ReadStream`
      Pause the `ReadSupport`. While it's paused, no data will be sent to the `dataHandler`
      Specified by:
        `pause` in interface `ReadStream<KafkaConsumerRecord<K,V>>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### resume

          public KafkaConsumer<K,V> resume()

      Description copied from interface: `ReadStream`
      Resume reading. If the `ReadSupport` has been paused, reading will recommence on it.
      Specified by:
        `resume` in interface `ReadStream<KafkaConsumerRecord<K,V>>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### endHandler

          public KafkaConsumer<K,V> endHandler(Handler<Void> endHandler)

      Description copied from interface: `ReadStream`
      Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
      Specified by:
        `endHandler` in interface `ReadStream<KafkaConsumerRecord<K,V>>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### subscribe

          public KafkaConsumer<K,V> subscribe(String topic)

      Subscribe to the given topic to get dynamically assigned partitions.
      Parameters:
        `topic` - topic to subscribe to
      Returns:
        current KafkaConsumer instance

    - #### subscribe

          public KafkaConsumer<K,V> subscribe(Set<String> topics)

      Subscribe to the given list of topics to get dynamically assigned partitions.
      Parameters:
        `topics` - topics to subscribe to
      Returns:
        current KafkaConsumer instance

    - #### subscribe

          public KafkaConsumer<K,V> subscribe(String topic,
                                              Handler<AsyncResult<Void>> completionHandler)

      Subscribe to the given topic to get dynamically assigned partitions.
      Parameters:
        `topic` - topic to subscribe to
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxSubscribe

          public rx.Single<Void> rxSubscribe(String topic)

      Subscribe to the given topic to get dynamically assigned partitions.
      Parameters:
        `topic` - topic to subscribe to
      Returns:

    - #### subscribe

          public KafkaConsumer<K,V> subscribe(Set<String> topics,
                                              Handler<AsyncResult<Void>> completionHandler)

      Subscribe to the given list of topics to get dynamically assigned partitions.
      Parameters:
        `topics` - topics to subscribe to
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxSubscribe

          public rx.Single<Void> rxSubscribe(Set<String> topics)

      Subscribe to the given list of topics to get dynamically assigned partitions.
      Parameters:
        `topics` - topics to subscribe to
      Returns:

    - #### assign

          public KafkaConsumer<K,V> assign(TopicPartition topicPartition)

      Manually assign a partition to this consumer.
      Parameters:
        `topicPartition` - partition which want assigned
      Returns:
        current KafkaConsumer instance

    - #### assign

          public KafkaConsumer<K,V> assign(Set<TopicPartition> topicPartitions)

      Manually assign a list of partition to this consumer.
      Parameters:
        `topicPartitions` - partitions which want assigned
      Returns:
        current KafkaConsumer instance

    - #### assign

          public KafkaConsumer<K,V> assign(TopicPartition topicPartition,
                                           Handler<AsyncResult<Void>> completionHandler)

      Manually assign a partition to this consumer.
      Parameters:
        `topicPartition` - partition which want assigned
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxAssign

          public rx.Single<Void> rxAssign(TopicPartition topicPartition)

      Manually assign a partition to this consumer.
      Parameters:
        `topicPartition` - partition which want assigned
      Returns:

    - #### assign

          public KafkaConsumer<K,V> assign(Set<TopicPartition> topicPartitions,
                                           Handler<AsyncResult<Void>> completionHandler)

      Manually assign a list of partition to this consumer.
      Parameters:
        `topicPartitions` - partitions which want assigned
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxAssign

          public rx.Single<Void> rxAssign(Set<TopicPartition> topicPartitions)

      Manually assign a list of partition to this consumer.
      Parameters:
        `topicPartitions` - partitions which want assigned
      Returns:

    - #### assignment

          public KafkaConsumer<K,V> assignment(Handler<AsyncResult<Set<TopicPartition>>> handler)

      Get the set of partitions currently assigned to this consumer.
      Parameters:
        `handler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxAssignment

          public rx.Single<Set<TopicPartition>> rxAssignment()

      Get the set of partitions currently assigned to this consumer.
      Returns:

    - #### unsubscribe

          public KafkaConsumer<K,V> unsubscribe()

      Unsubscribe from topics currently subscribed with subscribe.
      Returns:
        current KafkaConsumer instance

    - #### unsubscribe

          public KafkaConsumer<K,V> unsubscribe(Handler<AsyncResult<Void>> completionHandler)

      Unsubscribe from topics currently subscribed with subscribe.
      Parameters:
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxUnsubscribe

          public rx.Single<Void> rxUnsubscribe()

      Unsubscribe from topics currently subscribed with subscribe.
      Returns:

    - #### subscription

          public KafkaConsumer<K,V> subscription(Handler<AsyncResult<Set<String>>> handler)

      Get the current subscription.
      Parameters:
        `handler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxSubscription

          public rx.Single<Set<String>> rxSubscription()

      Get the current subscription.
      Returns:

    - #### pause

          public KafkaConsumer<K,V> pause(TopicPartition topicPartition)

      Suspend fetching from the requested partition.
      Parameters:
        `topicPartition` - topic partition from which suspend fetching
      Returns:
        current KafkaConsumer instance

    - #### pause

          public KafkaConsumer<K,V> pause(Set<TopicPartition> topicPartitions)

      Suspend fetching from the requested partitions.
      Parameters:
        `topicPartitions` - topic partition from which suspend fetching
      Returns:
        current KafkaConsumer instance

    - #### pause

          public KafkaConsumer<K,V> pause(TopicPartition topicPartition,
                                          Handler<AsyncResult<Void>> completionHandler)

      Suspend fetching from the requested partition.
      Parameters:
        `topicPartition` - topic partition from which suspend fetching
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxPause

          public rx.Single<Void> rxPause(TopicPartition topicPartition)

      Suspend fetching from the requested partition.
      Parameters:
        `topicPartition` - topic partition from which suspend fetching
      Returns:

    - #### pause

          public KafkaConsumer<K,V> pause(Set<TopicPartition> topicPartitions,
                                          Handler<AsyncResult<Void>> completionHandler)

      Suspend fetching from the requested partitions.
      Parameters:
        `topicPartitions` - topic partition from which suspend fetching
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxPause

          public rx.Single<Void> rxPause(Set<TopicPartition> topicPartitions)

      Suspend fetching from the requested partitions.
      Parameters:
        `topicPartitions` - topic partition from which suspend fetching
      Returns:

    - #### paused

          public void paused(Handler<AsyncResult<Set<TopicPartition>>> handler)

      Get the set of partitions that were previously paused by a call to pause(Set).
      Parameters:
        `handler` - handler called on operation completed

    - #### rxPaused

          public rx.Single<Set<TopicPartition>> rxPaused()

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

    - #### resume

          public KafkaConsumer<K,V> resume(TopicPartition topicPartition)

      Resume specified partition which have been paused with pause.
      Parameters:
        `topicPartition` - topic partition from which resume fetching
      Returns:
        current KafkaConsumer instance

    - #### resume

          public KafkaConsumer<K,V> resume(Set<TopicPartition> topicPartitions)

      Resume specified partitions which have been paused with pause.
      Parameters:
        `topicPartitions` - topic partition from which resume fetching
      Returns:
        current KafkaConsumer instance

    - #### resume

          public KafkaConsumer<K,V> resume(TopicPartition topicPartition,
                                           Handler<AsyncResult<Void>> completionHandler)

      Resume specified partition which have been paused with pause.
      Parameters:
        `topicPartition` - topic partition from which resume fetching
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxResume

          public rx.Single<Void> rxResume(TopicPartition topicPartition)

      Resume specified partition which have been paused with pause.
      Parameters:
        `topicPartition` - topic partition from which resume fetching
      Returns:

    - #### resume

          public KafkaConsumer<K,V> resume(Set<TopicPartition> topicPartitions,
                                           Handler<AsyncResult<Void>> completionHandler)

      Resume specified partitions which have been paused with pause.
      Parameters:
        `topicPartitions` - topic partition from which resume fetching
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxResume

          public rx.Single<Void> rxResume(Set<TopicPartition> topicPartitions)

      Resume specified partitions which have been paused with pause.
      Parameters:
        `topicPartitions` - topic partition from which resume fetching
      Returns:

    - #### partitionsRevokedHandler

          public KafkaConsumer<K,V> partitionsRevokedHandler(Handler<Set<TopicPartition>> handler)

      Set the handler called when topic partitions are revoked to the consumer
      Parameters:
        `handler` - handler called on revoked topic partitions
      Returns:
        current KafkaConsumer instance

    - #### partitionsAssignedHandler

          public KafkaConsumer<K,V> partitionsAssignedHandler(Handler<Set<TopicPartition>> handler)

      Set the handler called when topic partitions are assigned to the consumer
      Parameters:
        `handler` - handler called on assigned topic partitions
      Returns:
        current KafkaConsumer instance

    - #### seek

          public KafkaConsumer<K,V> seek(TopicPartition topicPartition,
                                         long offset)

      Overrides the fetch offsets that the consumer will use on the next poll.
      Parameters:
        `topicPartition` - topic partition for which seek
        `offset` - offset to seek inside the topic partition
      Returns:
        current KafkaConsumer instance

    - #### seek

          public KafkaConsumer<K,V> seek(TopicPartition topicPartition,
                                         long offset,
                                         Handler<AsyncResult<Void>> completionHandler)

      Overrides the fetch offsets that the consumer will use on the next poll.
      Parameters:
        `topicPartition` - topic partition for which seek
        `offset` - offset to seek inside the topic partition
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxSeek

          public rx.Single<Void> rxSeek(TopicPartition topicPartition,
                                        long offset)

      Overrides the fetch offsets that the consumer will use on the next poll.
      Parameters:
        `topicPartition` - topic partition for which seek
        `offset` - offset to seek inside the topic partition
      Returns:

    - #### seekToBeginning

          public KafkaConsumer<K,V> seekToBeginning(TopicPartition topicPartition)

      Seek to the first offset for each of the given partition.
      Parameters:
        `topicPartition` - topic partition for which seek
      Returns:
        current KafkaConsumer instance

    - #### seekToBeginning

          public KafkaConsumer<K,V> seekToBeginning(Set<TopicPartition> topicPartitions)

      Seek to the first offset for each of the given partitions.
      Parameters:
        `topicPartitions` - topic partition for which seek
      Returns:
        current KafkaConsumer instance

    - #### seekToBeginning

          public KafkaConsumer<K,V> seekToBeginning(TopicPartition topicPartition,
                                                    Handler<AsyncResult<Void>> completionHandler)

      Seek to the first offset for each of the given partition.
      Parameters:
        `topicPartition` - topic partition for which seek
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxSeekToBeginning

          public rx.Single<Void> rxSeekToBeginning(TopicPartition topicPartition)

      Seek to the first offset for each of the given partition.
      Parameters:
        `topicPartition` - topic partition for which seek
      Returns:

    - #### seekToBeginning

          public KafkaConsumer<K,V> seekToBeginning(Set<TopicPartition> topicPartitions,
                                                    Handler<AsyncResult<Void>> completionHandler)

      Seek to the first offset for each of the given partitions.
      Parameters:
        `topicPartitions` - topic partition for which seek
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxSeekToBeginning

          public rx.Single<Void> rxSeekToBeginning(Set<TopicPartition> topicPartitions)

      Seek to the first offset for each of the given partitions.
      Parameters:
        `topicPartitions` - topic partition for which seek
      Returns:

    - #### seekToEnd

          public KafkaConsumer<K,V> seekToEnd(TopicPartition topicPartition)

      Seek to the last offset for each of the given partition.
      Parameters:
        `topicPartition` - topic partition for which seek
      Returns:
        current KafkaConsumer instance

    - #### seekToEnd

          public KafkaConsumer<K,V> seekToEnd(Set<TopicPartition> topicPartitions)

      Seek to the last offset for each of the given partitions.
      Parameters:
        `topicPartitions` - topic partition for which seek
      Returns:
        current KafkaConsumer instance

    - #### seekToEnd

          public KafkaConsumer<K,V> seekToEnd(TopicPartition topicPartition,
                                              Handler<AsyncResult<Void>> completionHandler)

      Seek to the last offset for each of the given partition.
      Parameters:
        `topicPartition` - topic partition for which seek
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxSeekToEnd

          public rx.Single<Void> rxSeekToEnd(TopicPartition topicPartition)

      Seek to the last offset for each of the given partition.
      Parameters:
        `topicPartition` - topic partition for which seek
      Returns:

    - #### seekToEnd

          public KafkaConsumer<K,V> seekToEnd(Set<TopicPartition> topicPartitions,
                                              Handler<AsyncResult<Void>> completionHandler)

      Seek to the last offset for each of the given partitions.
      Parameters:
        `topicPartitions` - topic partition for which seek
        `completionHandler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxSeekToEnd

          public rx.Single<Void> rxSeekToEnd(Set<TopicPartition> topicPartitions)

      Seek to the last offset for each of the given partitions.
      Parameters:
        `topicPartitions` - topic partition for which seek
      Returns:

    - #### commit

          public void commit()

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

    - #### commit

          public void commit(Handler<AsyncResult<Void>> completionHandler)

      Commit current offsets for all the subscribed list of topics and partition.
      Parameters:
        `completionHandler` - handler called on operation completed

    - #### rxCommit

          public rx.Single<Void> rxCommit()

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

    - #### committed

          public void committed(TopicPartition topicPartition,
                                Handler<AsyncResult<OffsetAndMetadata>> handler)

      Get the last committed offset for the given partition (whether the commit happened by this process or another).
      Parameters:
        `topicPartition` - topic partition for getting last committed offset
        `handler` - handler called on operation completed

    - #### rxCommitted

          public rx.Single<OffsetAndMetadata> rxCommitted(TopicPartition topicPartition)

      Get the last committed offset for the given partition (whether the commit happened by this process or another).
      Parameters:
        `topicPartition` - topic partition for getting last committed offset
      Returns:

    - #### partitionsFor

          public KafkaConsumer<K,V> partitionsFor(String topic,
                                                  Handler<AsyncResult<List<PartitionInfo>>> handler)

      Get metadata about the partitions for a given topic.
      Parameters:
        `topic` - topic partition for which getting partitions info
        `handler` - handler called on operation completed
      Returns:
        current KafkaConsumer instance

    - #### rxPartitionsFor

          public rx.Single<List<PartitionInfo>> rxPartitionsFor(String topic)

      Get metadata about the partitions for a given topic.
      Parameters:
        `topic` - topic partition for which getting partitions info
      Returns:

    - #### close

          public void close()

      Close the consumer

    - #### close

          public void close(Handler<AsyncResult<Void>> completionHandler)

      Close the consumer
      Parameters:
        `completionHandler` - handler called on operation completed

    - #### rxClose

          public rx.Single<Void> rxClose()

      Close the consumer
      Returns:

    - #### position

          public void position(TopicPartition partition,
                               Handler<AsyncResult<Long>> handler)

      Get the offset of the next record that will be fetched (if a record with that offset exists).
      Parameters:
        `partition` - The partition to get the position for
        `handler` - handler called on operation completed

    - #### rxPosition

          public rx.Single<Long> rxPosition(TopicPartition partition)

      Get the offset of the next record that will be fetched (if a record with that offset exists).
      Parameters:
        `partition` - The partition to get the position for
      Returns:

    - #### newInstance

          public static <K,V> KafkaConsumer newInstance(KafkaConsumer arg)

    - #### newInstance

          public static <K,V> KafkaConsumer newInstance(KafkaConsumer arg,
                                                        TypeArg<K> __typeArg_K,
                                                        TypeArg<V> __typeArg_V)

Copyright © 2017. All rights reserved.