public interface KafkaTupleListener extends Serializable
| 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> partitions)
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.
|
void open(Map<String,Object> conf, TopologyContext context)
conf - The storm configuration.context - The TopologyContextvoid onEmit(List<Object> tuple, KafkaSpoutMessageId msgId)
tuple - the storm tuple.msgId - The id of the tuple in the spout.void onAck(KafkaSpoutMessageId msgId)
msgId - The id of the tuple in the spout.void onPartitionsReassigned(Collection<org.apache.kafka.common.TopicPartition> partitions)
partitions - The list of partitions that are now assigned to the consumer (may include partitions previously
assigned to the consumer)void onRetry(KafkaSpoutMessageId msgId)
msgId - The id of the tuple in the spout.void onMaxRetryReached(KafkaSpoutMessageId msgId)
msgId - The id of the tuple in the spout.Copyright © 2023 The Apache Software Foundation. All rights reserved.