Package org.apache.storm.kafka.spout
Class EmptyKafkaTupleListener
java.lang.Object
org.apache.storm.kafka.spout.EmptyKafkaTupleListener
- All Implemented Interfaces:
- Serializable,- KafkaTupleListener
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidonAck(KafkaSpoutMessageId msgId) Called when a tuple is acked.voidonEmit(List<Object> tuple, KafkaSpoutMessageId msgId) Called when the tuple is emitted and auto commit is disabled.voidCalled when the maximum number of retries have been reached.voidonPartitionsReassigned(Collection<org.apache.kafka.common.TopicPartition> topicPartitions) Called when kafka partitions are rebalanced.voidonRetry(KafkaSpoutMessageId msgId) Called when the Kafka spout sets a record for retry.voidopen(Map<String, Object> conf, TopologyContext context) Called during the initialization of the kafka spout.toString()
- 
Constructor Details- 
EmptyKafkaTupleListenerpublic EmptyKafkaTupleListener()
 
- 
- 
Method Details- 
openDescription copied from interface:KafkaTupleListenerCalled during the initialization of the kafka spout.- Specified by:
- openin interface- KafkaTupleListener
- Parameters:
- conf- The storm configuration.
- context- The- TopologyContext
 
- 
onEmitDescription copied from interface: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.- Specified by:
- onEmitin interface- KafkaTupleListener
- Parameters:
- tuple- the storm tuple.
- msgId- The id of the tuple in the spout.
 
- 
onAckDescription copied from interface:KafkaTupleListenerCalled when a tuple is acked.- Specified by:
- onAckin interface- KafkaTupleListener
- Parameters:
- msgId- The id of the tuple in the spout.
 
- 
onPartitionsReassignedpublic void onPartitionsReassigned(Collection<org.apache.kafka.common.TopicPartition> topicPartitions) Description copied from interface:KafkaTupleListenerCalled when kafka partitions are rebalanced.- Specified by:
- onPartitionsReassignedin interface- KafkaTupleListener
- Parameters:
- topicPartitions- The list of partitions that are now assigned to the consumer (may include partitions previously assigned to the consumer)
 
- 
onRetryDescription copied from interface:KafkaTupleListenerCalled when the Kafka spout sets a record for retry.- Specified by:
- onRetryin interface- KafkaTupleListener
- Parameters:
- msgId- The id of the tuple in the spout.
 
- 
onMaxRetryReachedDescription copied from interface:KafkaTupleListenerCalled when the maximum number of retries have been reached.- Specified by:
- onMaxRetryReachedin interface- KafkaTupleListener
- Parameters:
- msgId- The id of the tuple in the spout.
 
- 
toString
 
-