Tzu-Li (Gordon) Tai created FLINK-15839:
-------------------------------------------
Summary: Revisit Stateful Functions KafkaIngressBuilder properties resolution logic
Key: FLINK-15839
URL:
https://issues.apache.org/jira/browse/FLINK-15839 Project: Flink
Issue Type: Bug
Components: Stateful Functions
Affects Versions: statefun-1.1
Reporter: Tzu-Li (Gordon) Tai
Assignee: Tzu-Li (Gordon) Tai
Currently, the properties resolution logic in {{KafkaIngressBuilder}} is a bit inconsistent for different configurations, and some actually incorrect.
The problem is around the fact that we allow users to directly pass in {{Properties}} to configure the Kafka client, but also support named methods to set some important configs like Kafka address / auto offset reset position.
For example, we always overwrite {{auto.offset.reset}} set in the properties with the {{autoOffsetResetPosition}} value in the builder. This is correct when the user had actually passed in a value via the named method {{withAutoOffsetResetPosition}}, but incorrect otherwise.
The same goes for the Kafka address configuration.
This should be revisited, so that we have a common strategy with dealing with named configurations v.s. properties, with an end goal that:
* Configs passed via named methods should always overwrite the value set via properties
* Any default values for named configuration methods should be defined in the builder
* If no config was passed via its named method, then we use the default value (if any) to overwrite the properties IFF the user also did not provide a value for it there.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)