Package org.apache.storm.kafka.spout

## Class EmptyKafkaTupleListener

- java.lang.Object
- - org.apache.storm.kafka.spout.EmptyKafkaTupleListener

- All Implemented Interfaces:
    `Serializable`, `KafkaTupleListener`

      public final class EmptyKafkaTupleListener
      extends Object
      implements KafkaTupleListener

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EmptyKafkaTupleListener()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `onAck​(KafkaSpoutMessageId msgId)` | Called when a tuple is acked.
    `void` | `onEmit​(List<Object> tuple, KafkaSpoutMessageId msgId)` | Called when the tuple is emitted and auto commit is disabled.
    `void` | `onMaxRetryReached​(KafkaSpoutMessageId msgId)` | Called when the maximum number of retries have been reached.
    `void` | `onPartitionsReassigned​(Collection<org.apache.kafka.common.TopicPartition> topicPartitions)` | Called when kafka partitions are rebalanced.
    `void` | `onRetry​(KafkaSpoutMessageId msgId)` | Called when the Kafka spout sets a record for retry.
    `void` | `open​(Map<String,​Object> conf, TopologyContext context)` | Called during the initialization of the kafka spout.
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### EmptyKafkaTupleListener

          public EmptyKafkaTupleListener()

  - ### Method Detail

    - #### open

          public void open​(Map<String,​Object> conf,
                           TopologyContext context)

      Description copied from interface: `KafkaTupleListener`
      Called during the initialization of the kafka spout.
      Specified by:
        `open` in interface `KafkaTupleListener`
      Parameters:
        `conf` - The storm configuration.
        `context` - The `TopologyContext`

    - #### onEmit

          public void onEmit​(List<Object> tuple,
                             KafkaSpoutMessageId msgId)

      Description copied from interface: `KafkaTupleListener`
      Called when the tuple is emitted and auto commit is disabled. If kafka auto commit is enabled, the kafka consumer will periodically (depending on the commit interval) commit the offsets. Therefore, storm disables anchoring for tuples when auto commit is enabled and the spout will not receive acks and fails for those tuples.
      Specified by:
        `onEmit` in interface `KafkaTupleListener`
      Parameters:
        `tuple` - the storm tuple.
        `msgId` - The id of the tuple in the spout.

    - #### onAck

          public void onAck​(KafkaSpoutMessageId msgId)

      Description copied from interface: `KafkaTupleListener`
      Called when a tuple is acked.
      Specified by:
        `onAck` in interface `KafkaTupleListener`
      Parameters:
        `msgId` - The id of the tuple in the spout.

    - #### onPartitionsReassigned

          public void onPartitionsReassigned​(Collection<org.apache.kafka.common.TopicPartition> topicPartitions)

      Description copied from interface: `KafkaTupleListener`
      Called when kafka partitions are rebalanced.
      Specified by:
        `onPartitionsReassigned` in interface `KafkaTupleListener`
      Parameters:
        `topicPartitions` - The list of partitions that are now assigned to the consumer (may include partitions previously assigned to the consumer)

    - #### onRetry

          public void onRetry​(KafkaSpoutMessageId msgId)

      Description copied from interface: `KafkaTupleListener`
      Called when the Kafka spout sets a record for retry.
      Specified by:
        `onRetry` in interface `KafkaTupleListener`
      Parameters:
        `msgId` - The id of the tuple in the spout.

    - #### onMaxRetryReached

          public void onMaxRetryReached​(KafkaSpoutMessageId msgId)

      Description copied from interface: `KafkaTupleListener`
      Called when the maximum number of retries have been reached.
      Specified by:
        `onMaxRetryReached` in interface `KafkaTupleListener`
      Parameters:
        `msgId` - The id of the tuple in the spout.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`