[
https://issues.apache.org/jira/browse/KAFKA-2389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14708866#comment-14708866
]
Ewen Cheslack-Postava commented on KAFKA-2389:
----------------------------------------------
If I'm understanding people's current positions, I think I agree with Jay that
we should take an all-or-nothing approach for async. People who want async
should know what they are doing. If they provide no args, they expect an async
commit with the current offsets; if they provide arguments, they might have to
provide a bit more information (OffsetAndMetadata rather than just offsets),
but that burden is perfectly acceptable for a relatively unusual use case.
Anyone using async commit should be comfortable passing in a callback (or null
if appropriate) for a callback to an async method. However, I still think the
commitAsync naming (or any similar differentiation between sync and async
commits) helps to make it clear to the user the semantics of the method they
are invoking. So I think 2 methods (no parameters & map + callback) for the
async variants should work well enough.
> CommitType seems not necessary in commit().
> -------------------------------------------
>
> Key: KAFKA-2389
> URL: https://issues.apache.org/jira/browse/KAFKA-2389
> Project: Kafka
> Issue Type: Sub-task
> Reporter: Jiangjie Qin
> Assignee: Jiangjie Qin
>
> The CommitType does not seem to be necessary in for commit(), it can be
> inferred from whether user passed in a callback or not.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)