Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2282#discussion_r134125786
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/EmptyKafkaTupleListener.java
 ---
    @@ -0,0 +1,33 @@
    +package org.apache.storm.kafka.spout;
    +
    +import java.util.List;
    +import java.util.Map;
    +
    +import org.apache.storm.spout.SpoutOutputCollector;
    +import org.apache.storm.task.TopologyContext;
    +
    +public class EmptyKafkaTupleListener implements KafkaTupleListener {
    +
    +    @Override
    +    public void open(Map<String, Object> conf, TopologyContext context, 
SpoutOutputCollector collector) { }
    +
    +    @Override
    +    public void onEmit(List<Object> tuple, KafkaSpoutMessageId msgId) { }
    +
    +    @Override
    +    public void onAck(KafkaSpoutMessageId msgId) { }
    +
    +    @Override
    +    public void onPartitionsReassigned(KafkaSpoutMessageId msgId) { }
    --- End diff --
    
    I think this should take the list of assigned partitions as a parameter, 
and be called in the onPartitionsAssigned of the rebalance listener instead. 
That would allow implementations to delete any saved message ids that are for 
revoked partitions easily.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to