[ https://issues.apache.org/jira/browse/KAFKA-2123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14628994#comment-14628994 ]
ASF GitHub Bot commented on KAFKA-2123: --------------------------------------- GitHub user hachikuji opened a pull request: https://github.com/apache/kafka/pull/79 [Minor] fix new consumer heartbeat reschedule bug This commit fixes a minor issue introduced in the patch for KAFKA-2123. The schedule method requires the time the task should be executed, not a delay. You can merge this pull request into a Git repository by running: $ git pull https://github.com/hachikuji/kafka KAFKA-2123-fix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/79.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #79 ---- commit 6eb7ec648fdd95e9c73cf6c452c425527e6c800d Author: Jason Gustafson <ja...@confluent.io> Date: 2015-07-16T00:10:12Z [Minor] fix new consumer heartbeat reschedule bug ---- > Make new consumer offset commit API use callback + future > --------------------------------------------------------- > > Key: KAFKA-2123 > URL: https://issues.apache.org/jira/browse/KAFKA-2123 > Project: Kafka > Issue Type: Sub-task > Components: clients, consumer > Reporter: Ewen Cheslack-Postava > Assignee: Jason Gustafson > Priority: Critical > Fix For: 0.8.3 > > Attachments: KAFKA-2123.patch, KAFKA-2123.patch, > KAFKA-2123_2015-04-30_11:23:05.patch, KAFKA-2123_2015-05-01_19:33:19.patch, > KAFKA-2123_2015-05-04_09:39:50.patch, KAFKA-2123_2015-05-04_22:51:48.patch, > KAFKA-2123_2015-05-29_11:11:05.patch, KAFKA-2123_2015-07-11_17:33:59.patch, > KAFKA-2123_2015-07-13_18:45:08.patch, KAFKA-2123_2015-07-14_13:20:25.patch, > KAFKA-2123_2015-07-14_18:21:38.patch > > > The current version of the offset commit API in the new consumer is > void commit(offsets, commit type) > where the commit type is either sync or async. This means you need to use > sync if you ever want confirmation that the commit succeeded. Some > applications will want to use asynchronous offset commit, but be able to tell > when the commit completes. > This is basically the same problem that had to be fixed going from old > consumer -> new consumer and I'd suggest the same fix using a callback + > future combination. The new API would be > Future<Void> commit(Map<TopicPartition, Long> offsets, ConsumerCommitCallback > callback); > where ConsumerCommitCallback contains a single method: > public void onCompletion(Exception exception); > We can provide shorthand variants of commit() for eliding the different > arguments. -- This message was sent by Atlassian JIRA (v6.3.4#6332)