Werner Daehn created KAFKA-20275:
------------------------------------
Summary: 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
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)