chia7712 commented on code in PR #23809:
URL: https://github.com/apache/kafka/pull/23809#discussion_r4269425762


##########
docs/streams/upgrade-guide.md:
##########
@@ -79,6 +79,10 @@ Kafka Streams no longer emits a WARN from 
`KafkaStreams#cleanUp()` when the appl
 
 Kafka Streams now validates the `application.server` configuration when 
`StreamsConfig` is created. The value must be empty or a valid endpoint from 
which Kafka Streams can parse both host and port, such as `host:port` or 
`protocol://host:port`. Invalid values that may previously have failed later 
during startup or assignment now fail earlier with a `ConfigException`. More 
details can be found in 
[KIP-1245](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1245%3A+Enforce+%27application.server%27+%3Cserver%3E%3A%3Cport%3E+format+at+config+level).
 
+`StreamPartitioner` has a new method `partitions(topic, key, value, headers, 
numPartitions)`, which receives the record headers. It is a default method that 
delegates to the existing method, which is deprecated and planned to be removed 
in 5.0. The built-in partitioners now pass the actual record headers to the key 
serializer instead of empty headers. For windowed keys written without a custom 
`StreamPartitioner`, a header-sensitive key serializer may therefore produce 
different partitions than before the upgrade, which breaks co-partitioning with 
data written before the upgrade. `KafkaStreams#queryMetadataForKey` also has 
new overloads that accept `Headers`. More details can be found in 
[KIP-1321](https://cwiki.apache.org/confluence/spaces/KAFKA/pages/421956773/KIP-1321+Headers+aware+StreamPartitioner).

Review Comment:
   This change made me notice that interactive-queries.md still uses methods 
that were removed a long time ago. I opened 
https://issues.apache.org/jira/browse/KAFKA-21278 to track it :)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to