You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/11/16 11:34:10 UTC

[GitHub] [kafka] C0urante commented on a change in pull request #9597: KAFKA-10720: Document prohibition on header mutation by SMTs

C0urante commented on a change in pull request #9597:
URL: https://github.com/apache/kafka/pull/9597#discussion_r524160693



##########
File path: connect/api/src/main/java/org/apache/kafka/connect/transforms/Transformation.java
##########
@@ -33,6 +33,9 @@
      * Apply transformation to the {@code record} and return another record object (which may be {@code record} itself) or {@code null},
      * corresponding to a map or filter operation respectively.
      *
+     * A transformation must not mutate the headers of a given {@code record}. If the headers need to be changed
+     * a new record with different headers should be created and returned.
+     *

Review comment:
       Should we also make a note about mutating other things such as the key/value of the record, which is possible for `Struct`, `Map`, and `Array` instances?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org