Guozhang Wang created KAFKA-9361:
------------------------------------
Summary: Consider being restrictive on overloaded commit function
with specific partition->offsets
Key: KAFKA-9361
URL: https://issues.apache.org/jira/browse/KAFKA-9361
Project: Kafka
Issue Type: Improvement
Components: consumer
Reporter: Guozhang Wang
Today in KafkaConsumer's overloaded commitSync / commitAsync that takes a
specific map of partitions -> offsetAndMetadata, we actually do not check if
the specified partitions belong to the consumer if auto-assignment is used
(i.e. `consumer.subscribe`). Which means that users can actually commit to any
partitions they want, since on the broker side we do not check partition map
either but only the generation.
It worth some discussion whether we want to make it more restrictive -- and the
key question is that today for those we use these overloaded functions with
not-owned partitions, are they used intentionally (like using it as a back
door) or actually by mistake (which then would be a bug on user's code that are
not easily discovered).
If anyone falls into the first case leveraging on these, please share your use
cases and thoughts about making it more restrictive --- or of course, your
rationales against it :)
We should not start preparing a PR for it until there's some agreement.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)