Github user chtyim commented on a diff in the pull request: https://github.com/apache/twill/pull/16#discussion_r89038384 --- Diff: twill-core/src/main/java/org/apache/twill/kafka/client/KafkaConsumer.java --- @@ -35,8 +35,10 @@ * Invoked when new messages is available. * @param messages Iterator of new messages. The {@link FetchedMessage} instance maybe reused in the Iterator * and across different invocation. + * @return A long larger than zero as the offset to restart fetching messages when offset error is caught, + * {@code -1} if the error cannot be resolved. Returns {@code 0} if no need to restart fetching. */ - void onReceived(Iterator<FetchedMessage> messages); + long onReceived(Iterator<FetchedMessage> messages); --- End diff -- How to indicate to restart from earliest or latest?
--- 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. ---