You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Omar Al-Safi (Jira)" <ji...@apache.org> on 2021/03/15 09:11:00 UTC

[jira] [Comment Edited] (CAMEL-16327) Kafka Consumer Component always commits latest offset on shutdown even if autoCommitOnStop == none

    [ https://issues.apache.org/jira/browse/CAMEL-16327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17301518#comment-17301518 ] 

Omar Al-Safi edited comment on CAMEL-16327 at 3/15/21, 9:10 AM:
----------------------------------------------------------------

[~acosentino] [~dfontana@cuebiq.com] yes that is fixed by CAMEL-16343. The issue as has been highlighted is that, whenever onPartitionsRevoked called internally in the Kafka Consumer, it was committing offsets regardless if you set `autoCommitEnable` or not. Now if you set `autoCommitEnable` to `false`, it will not commit any offsets.


was (Author: omarsmak):
[~acosentino] [~dfontana@cuebiq.com] yes that is fixed by CAMEL-16343. The issue as has been highlighted is that, whenever onPartitionsRevoked internally in the Kafka Consumer, it was committing offsets regardless if you set `autoCommitEnable` or not. Now if you set `autoCommitEnable` to `false`, it will not commit any offsets.

> Kafka Consumer Component always commits latest offset on shutdown even if autoCommitOnStop == none
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-16327
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16327
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-kafka
>    Affects Versions: 3.6.0, 3.7.0, 3.7.1, 3.7.2, 3.8.0
>            Reporter: Damiano Fontana
>            Priority: Major
>             Fix For: 3.9.0
>
>
> Kafka Consumer Component configured with 
>  * autoCommitEnable == false
>  * allowManualCommit == true
>  * autoCommitOnStop == none
> always commits the last seen offset for every partition when route is shut down.
> What's happens is the following:
>  # consumer.unsubscribe() is called
>  # onPartitionsRevoked() is called
>  # commitOffset() with forceCommit == true is called



--
This message was sent by Atlassian Jira
(v8.3.4#803005)