[
https://issues.apache.org/jira/browse/KAFKA-20275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18064193#comment-18064193
]
Werner Daehn commented on KAFKA-20275:
--------------------------------------
Latest confluent python library, btw.
> API to set commit offsets without being subscribed
> --------------------------------------------------
>
> Key: KAFKA-20275
> URL: https://issues.apache.org/jira/browse/KAFKA-20275
> Project: Kafka
> Issue Type: Improvement
> Components: consumer
> Affects Versions: 4.1.1
> Reporter: Werner Daehn
> Priority: Minor
>
> Imagine you want to reset the consumer offset to something earlier. The last
> delta load from offset 100-200 was technically successful but you need to run
> it again.
> So you want to change the offset for topic1/partition0 to 100 again.
> But you cannot, because the only API allowing to change offsets is the
> consumer api and that requires to subscribe first. Without the subscribe,
> assign only, you get a `Commit failed: Broker: Unknown member`.
> But subscribe assigns partitions to you instead of you being in control of
> what partitions you want to change.
>
> Hence the procedure should be:
> * consumer.assign(topicpartitions)
> * consumer.commit(topicpartitions)
> * a rebalance is triggered for all existing consumers to notify them about
> the commit offset change.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)