[ https://issues.apache.org/jira/browse/KAFKA-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16517556#comment-16517556 ]
ASF GitHub Bot commented on KAFKA-6938: --------------------------------------- guozhangwang closed pull request #5252: KAFKA-6938: Add headers support in new api section URL: https://github.com/apache/kafka/pull/5252 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/docs/streams/upgrade-guide.html b/docs/streams/upgrade-guide.html index cd9278262b7..a74eeb88222 100644 --- a/docs/streams/upgrade-guide.html +++ b/docs/streams/upgrade-guide.html @@ -134,6 +134,12 @@ <h3><a id="streams_api_changes_200" href="#streams_api_changes_200">Streams API to let users specify inner serdes if the default serde classes are windowed serdes. For more details, see <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-265%3A+Make+Windowed+Serde+to+public+APIs">KIP-265</a>. </p> + <p> + We've added message header support in the <code>Processor API</code> in Kafka 2.0.0. In particular, we have added a new API <code>ProcessorContext#headers()</code> + which returns a <code>Headers</code> object that keeps track of the headers of the source topic's message that is being processed. Through this object, users can manipulate + the headers map that is being propagated throughout the processor topology as well. For more details please feel free to read + the <a href="/{{version}}/documentation/streams/developer-guide/processor-api.html#accessing-processor-context">Developer Guide</a> section. + </p> <p> We have deprecated constructors of <code>KafkaStreams</code> that take a <code>StreamsConfig</code> as parameter. Please use the other corresponding constructors that accept <code>java.util.Properties</code> instead. @@ -163,7 +169,8 @@ <h3><a id="streams_api_changes_200" href="#streams_api_changes_200">Streams API </p> <p> Kafka Streams DSL for Scala is a new Kafka Streams client library available for developers authoring Kafka Streams applications in Scala. It wraps core Kafka Streams DSL types to make it easier to call when - interoperating with Scala code. For example, it includes higher order functions as parameters for transformations avoiding the need anonymous classes in Java 7 or experimental SAM type conversions in Scala 2.11, automatic conversion between Java and Scala collection types, a way + interoperating with Scala code. For example, it includes higher order functions as parameters for transformations avoiding the need anonymous classes in Java 7 or experimental SAM type conversions in Scala 2.11, + automatic conversion between Java and Scala collection types, a way to implicitly provide SerDes to reduce boilerplate from your application and make it more typesafe, and more! For more information see the <a href="/{{version}}/documentation/streams/developer-guide/dsl-api.html#scala-dsl">Kafka Streams DSL for Scala documentation</a> and <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-270+-+A+Scala+Wrapper+Library+for+Kafka+Streams">KIP-270</a>. @@ -181,7 +188,7 @@ <h3><a id="streams_api_changes_200" href="#streams_api_changes_200">Streams API For detailed guidance on how to update your code please read <a href="#streams_api_changes_100">here</a></li> <li><code>KStream, KTable, KGroupedStream</code> overloaded functions that requires serde and other specifications explicitly are removed and replaced with simpler overloaded functions that use <code>Consumed, Produced, Serialized, Materialized, Joined</code> (they are deprecated since 1.0.0). For detailed guidance on how to update your code please read <a href="#streams_api_changes_100">here</a></li> - <li><code>Processor#punctuate</code>, <code>ValueTransformer#punctuate</code>, <code>ValueTransformer#punctuate</code> and <code>RecordContext#schedule(long)</code> are removed and replaced by <code>RecordContext#schedule(long, PunctuationType, Punctuator)</code> (they are deprecated in 1.0.0). </li> + <li><code>Processor#punctuate</code>, <code>ValueTransformer#punctuate</code>, <code>ValueTransformer#punctuate</code> and <code>ProcessorContext#schedule(long)</code> are removed and replaced by <code>ProcessorContext#schedule(long, PunctuationType, Punctuator)</code> (they are deprecated in 1.0.0). </li> <li>The second <code>boolean</code> typed parameter "loggingEnabled" in <code>ProcessorContext#register</code> has been removed; users can now use <code>StoreBuilder#withLoggingEnabled, withLoggingDisabled</code> to specify the behavior when they create the state store. </li> <li><code>KTable#writeAs, print, foreach, to, through</code> are removed, users can call <code>KTable#tostream()#writeAs</code> instead for the same purpose (they are deprecated since 0.11.0.0). For detailed list of removed APIs please read <a href="#streams_api_changes_0110">here</a></li> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Add documentation for accessing Headers on Kafka Streams Processor API > ---------------------------------------------------------------------- > > Key: KAFKA-6938 > URL: https://issues.apache.org/jira/browse/KAFKA-6938 > Project: Kafka > Issue Type: Improvement > Components: documentation, streams > Affects Versions: 2.0.0 > Reporter: Jorge Quilcate > Assignee: Jorge Quilcate > Priority: Major > Fix For: 2.0.0 > > > Document changes implemented on KIP-244. -- This message was sent by Atlassian JIRA (v7.6.3#76005)