public final class EmptyKafkaTupleListener extends Object implements KafkaTupleListener
| Constructor and Description |
|---|
EmptyKafkaTupleListener() |
| Modifier and Type | Method and 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() |
public void open(Map<String,Object> conf, TopologyContext context)
KafkaTupleListenerCalled during the initialization of the kafka spout.
open in interface KafkaTupleListenerconf - The storm configuration.context - The TopologyContextpublic void onEmit(List<Object> tuple, KafkaSpoutMessageId msgId)
KafkaTupleListenerCalled 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.
onEmit in interface KafkaTupleListenertuple - the storm tuple.msgId - The id of the tuple in the spout.public void onAck(KafkaSpoutMessageId msgId)
KafkaTupleListenerCalled when a tuple is acked.
onAck in interface KafkaTupleListenermsgId - The id of the tuple in the spout.public void onPartitionsReassigned(Collection<org.apache.kafka.common.TopicPartition> topicPartitions)
KafkaTupleListenerCalled when kafka partitions are rebalanced.
onPartitionsReassigned in interface KafkaTupleListenertopicPartitions - The list of partitions that are now assigned to the consumer (may include partitions previously assigned to the consumer)public void onRetry(KafkaSpoutMessageId msgId)
KafkaTupleListenerCalled when the Kafka spout sets a record for retry.
onRetry in interface KafkaTupleListenermsgId - The id of the tuple in the spout.public void onMaxRetryReached(KafkaSpoutMessageId msgId)
KafkaTupleListenerCalled when the maximum number of retries have been reached.
onMaxRetryReached in interface KafkaTupleListenermsgId - The id of the tuple in the spout.Copyright © 2021 The Apache Software Foundation. All rights reserved.