Github user XuMingmin commented on the issue:
https://github.com/apache/storm/pull/1919
I would prefer to keep case 1 for at-most-once, when user want to avoid
manage the offset additional in `KafkaSpout`.
IMO, there's no difference for guarantee between case 3 and case 1. It's
achieved either committed by `KafkaSpout` or by `KafkaConsumer`. Back to the
discussion before, I think case 1 can also guarantee after reading code of
`KafkaSpout` as below:
*it's assumed that `KafkaSpout.close()` is called in any crash, otherwise
no for both *
1. `close()` call `shutdown`;
2. when `consumerAutoCommitMode=false`, `commitOffsetsForAckedTuples()` is
called to commit offset;
3. then `kafkaConsumer.close()` in the `finally` block would commit the
latest offset if `consumerAutoCommitMode=true`, as
~~~Java
KafkaConsuer.close()
-> ClientUtils.closeQuietly(coordinator, "coordinator", firstException);
-> ConsumerCoordinator.close()
-> ConsumerCoordinator.maybeAutoCommitOffsetsSync();
-> commitOffsetsSync(subscriptions.allConsumed());
~~~
---
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 [email protected] or file a JIRA ticket
with INFRA.
---