Chia-Ping Tsai created KAFKA-10412:
--------------------------------------

             Summary: Deprecate all setters of Headers
                 Key: KAFKA-10412
                 URL: https://issues.apache.org/jira/browse/KAFKA-10412
             Project: Kafka
          Issue Type: Improvement
            Reporter: Chia-Ping Tsai
            Assignee: Chia-Ping Tsai


_Headers is a part of public APIs but the usage of Headers is a bit chaos to 
users._
 # it has a lot of abstract setters so users have to implement all of them. 
However, we never call user-defined setters in production.
 # it is not thread-safe so we have to call "setReadOnly" to make data 
consistency.
 # "setReadOnly" is not a part of public API so users have no idea about the 
"thread-safe" of Headers

We can't improve Headers right now by reason of deprecation cycles. This KIP 
plans to deprecate and offer default implementation 
(_java_.lang.UnsupportedOperationException) to all setters of _Headers so we 
can cleanup all setters to make it be readonly in next major and users are able 
to remove all useless implementation from their_ _Headers in this patch._



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

Reply via email to