lucasbru commented on code in PR #16316: URL: https://github.com/apache/kafka/pull/16316#discussion_r1638710729
########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the Review Comment: ```suggestion Both new methods have multiple overloads and return a <code>KStream</code> instead of <code>void</code> as the ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is + added for a better interface hierarchy. + </p> + + <p> + Emitting a windowed aggregation result only after a window is closed is currently supported via the + <code>suppress()</code> operator. However, <code>suppress()</code> uses an in-memory implementation and does not + support RocksDB. To close this gap, + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-825%3A+introduce+a+new+API+to+control+when+aggregated+results+are+produced">KIP-825</a> + introduces "emit strategies" which are built into the aggregation operator directly to use the already existing + RocksDB store. <code>TimeWindowedKStream.emitStrategy(EmitStrategy)</code> and + <code>SessionWindowedKStream.emitStrategy(EmitStrategy)</code> allow to pick between "emit on window update" (default) Review Comment: ```suggestion <code>SessionWindowedKStream.emitStrategy(EmitStrategy)</code> allow picking between "emit on window update" (default) ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is + added for a better interface hierarchy. + </p> + + <p> + Emitting a windowed aggregation result only after a window is closed is currently supported via the + <code>suppress()</code> operator. However, <code>suppress()</code> uses an in-memory implementation and does not + support RocksDB. To close this gap, + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-825%3A+introduce+a+new+API+to+control+when+aggregated+results+are+produced">KIP-825</a> + introduces "emit strategies" which are built into the aggregation operator directly to use the already existing + RocksDB store. <code>TimeWindowedKStream.emitStrategy(EmitStrategy)</code> and + <code>SessionWindowedKStream.emitStrategy(EmitStrategy)</code> allow to pick between "emit on window update" (default) + and "emit on window close" strategies. Additionally, a few new emit metrics are added, as well as a necessary + new method <code>SessionStore.findSessions(long, long)</code>. + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=211882832">KIP-834</a> allows to pause + and resume a Kafka Streams instance. Pausing implies that processing input records and executing punctuations will Review Comment: ```suggestion and resuming a Kafka Streams instance. Pausing implies that processing input records and executing punctuations will ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is + added for a better interface hierarchy. + </p> + + <p> + Emitting a windowed aggregation result only after a window is closed is currently supported via the + <code>suppress()</code> operator. However, <code>suppress()</code> uses an in-memory implementation and does not + support RocksDB. To close this gap, + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-825%3A+introduce+a+new+API+to+control+when+aggregated+results+are+produced">KIP-825</a> + introduces "emit strategies" which are built into the aggregation operator directly to use the already existing + RocksDB store. <code>TimeWindowedKStream.emitStrategy(EmitStrategy)</code> and + <code>SessionWindowedKStream.emitStrategy(EmitStrategy)</code> allow to pick between "emit on window update" (default) + and "emit on window close" strategies. Additionally, a few new emit metrics are added, as well as a necessary + new method <code>SessionStore.findSessions(long, long)</code>. + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=211882832">KIP-834</a> allows to pause Review Comment: ```suggestion <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=211882832">KIP-834</a> allows pausing ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is + added for a better interface hierarchy. + </p> + + <p> + Emitting a windowed aggregation result only after a window is closed is currently supported via the + <code>suppress()</code> operator. However, <code>suppress()</code> uses an in-memory implementation and does not + support RocksDB. To close this gap, + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-825%3A+introduce+a+new+API+to+control+when+aggregated+results+are+produced">KIP-825</a> + introduces "emit strategies" which are built into the aggregation operator directly to use the already existing + RocksDB store. <code>TimeWindowedKStream.emitStrategy(EmitStrategy)</code> and + <code>SessionWindowedKStream.emitStrategy(EmitStrategy)</code> allow to pick between "emit on window update" (default) + and "emit on window close" strategies. Additionally, a few new emit metrics are added, as well as a necessary + new method <code>SessionStore.findSessions(long, long)</code>. Review Comment: ```suggestion new method, <code>SessionStore.findSessions(long, long)</code>. ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point Review Comment: ```suggestion Note: Due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the Review Comment: ```suggestion introduces <code>KafkaStreams.close(CloseOptions)</code> overload, which allows forcing an instance to leave the ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is + added for a better interface hierarchy. + </p> + + <p> + Emitting a windowed aggregation result only after a window is closed is currently supported via the + <code>suppress()</code> operator. However, <code>suppress()</code> uses an in-memory implementation and does not + support RocksDB. To close this gap, + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-825%3A+introduce+a+new+API+to+control+when+aggregated+results+are+produced">KIP-825</a> + introduces "emit strategies" which are built into the aggregation operator directly to use the already existing + RocksDB store. <code>TimeWindowedKStream.emitStrategy(EmitStrategy)</code> and + <code>SessionWindowedKStream.emitStrategy(EmitStrategy)</code> allow to pick between "emit on window update" (default) + and "emit on window close" strategies. Additionally, a few new emit metrics are added, as well as a necessary + new method <code>SessionStore.findSessions(long, long)</code>. + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=211882832">KIP-834</a> allows to pause + and resume a Kafka Streams instance. Pausing implies that processing input records and executing punctuations will + be skipped; Kafka Streams will continue to poll to maintain its group membership and may commit offsets. + In addition to the new method <code>KafkaStreams.pause()</code> and <code>KafkaStreams.resume()</code>, it is also + supported to check if an instance is paused via <code>KafkaStreams.isPaused()</code> method. + </p> + + <p> + To improve monitoring of Kafka Streams applications, <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=211886093">KIP-846</a> + adds four new metrics <code>bytes-consumed-total</code>, <code>records-consumed-total</code>, + <code>bytes-produced-total</code>, and <code>records-produced-total</code> within a new <b>topic level</b> scope. + The metrics are collected at INFO level for source and sink nodes respectively. Review Comment: ```suggestion The metrics are collected at INFO level for source and sink nodes, respectively. ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is Review Comment: ```suggestion disallowed key modification inside <code>processValues()</code>. Furthermore, <code>ProcessingContext</code> is ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is + added for a better interface hierarchy. + </p> + + <p> + Emitting a windowed aggregation result only after a window is closed is currently supported via the + <code>suppress()</code> operator. However, <code>suppress()</code> uses an in-memory implementation and does not + support RocksDB. To close this gap, + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-825%3A+introduce+a+new+API+to+control+when+aggregated+results+are+produced">KIP-825</a> + introduces "emit strategies" which are built into the aggregation operator directly to use the already existing Review Comment: ```suggestion introduces "emit strategies", which are built into the aggregation operator directly to use the already existing ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is + added for a better interface hierarchy. + </p> + + <p> + Emitting a windowed aggregation result only after a window is closed is currently supported via the + <code>suppress()</code> operator. However, <code>suppress()</code> uses an in-memory implementation and does not + support RocksDB. To close this gap, + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-825%3A+introduce+a+new+API+to+control+when+aggregated+results+are+produced">KIP-825</a> + introduces "emit strategies" which are built into the aggregation operator directly to use the already existing + RocksDB store. <code>TimeWindowedKStream.emitStrategy(EmitStrategy)</code> and + <code>SessionWindowedKStream.emitStrategy(EmitStrategy)</code> allow to pick between "emit on window update" (default) + and "emit on window close" strategies. Additionally, a few new emit metrics are added, as well as a necessary + new method <code>SessionStore.findSessions(long, long)</code>. + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=211882832">KIP-834</a> allows to pause + and resume a Kafka Streams instance. Pausing implies that processing input records and executing punctuations will + be skipped; Kafka Streams will continue to poll to maintain its group membership and may commit offsets. + In addition to the new method <code>KafkaStreams.pause()</code> and <code>KafkaStreams.resume()</code>, it is also Review Comment: ```suggestion In addition to the new methods <code>KafkaStreams.pause()</code> and <code>KafkaStreams.resume()</code>, it is also ``` ########## docs/streams/upgrade-guide.html: ########## @@ -303,6 +303,62 @@ <h3><a id="streams_api_changes_350" href="#streams_api_changes_350">Streams API adds a new config <code>default.client.supplier</code> that allows to use a custom <code>KafkaClientSupplier</code> without any code changes. </p> + <h3><a id="streams_api_changes_330" href="#streams_api_changes_330">Streams API changes in 3.3.0</a></h3> + <p> + Kafka Streams does not send a "leave group" request when an instance is closed. This behavior implies + that a rebalance is delayed until max.poll.interval.ms passed. + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-812%3A+Introduce+another+form+of+the+%60KafkaStreams.close%28%29%60+API+that+forces+the+member+to+leave+the+consumer+group">KIP-812</a> + introduces <code>KafkaStreams.close(CloseOptions)</code> overload which allows to force an instance to leave the + group immediately. + + Note: due to internal limitations, <code>CloseOptions</code> only works for static consumer groups at this point + (cf. <a href="https://issues.apache.org/jira/browse/KAFKA-16514">KAFKA-16514</a> for more details and a fix in + some future release). + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-820%3A+Extend+KStream+process+with+new+Processor+API">KIP-820</a> + adapts the PAPI type-safety improvement of KIP-478 into the DSL. The existing methods <code>KStream.transform</code>, + <code>KStream.flatTransform</code>, <code>KStream.transformValues</code>, and <code>KStream.flatTransformValues</code> + as well as all overloads of <code>void KStream.process</code> are deprecated in favor of the newly added methods + <ul> + <li><code>KStream<KOut,VOut> KStream.process(ProcessorSupplier, ...)</code></li> + <li><code>KStream<K,VOut> KStream.processValues(FixedKeyProcessorSupplier, ...)</code></li> + </ul> + Both new methods have multiple overlaods and return a <code>KStream</code> instead of <code>void</code> as the + deprecated <code>process()</code> methods did. In addition, <code>FixedKeyProcessor</code>, <code>FixedKeyRecord</code>, + <code>FixedKeyProcessorContext</code>, and <code>ContextualFixedKeyProcessor</code> are introduced to guard against + disallowed key modification inside <code>processValues()</code>. Furthermore <code>ProcessingContext</code> is + added for a better interface hierarchy. + </p> + + <p> + Emitting a windowed aggregation result only after a window is closed is currently supported via the + <code>suppress()</code> operator. However, <code>suppress()</code> uses an in-memory implementation and does not + support RocksDB. To close this gap, + <a href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-825%3A+introduce+a+new+API+to+control+when+aggregated+results+are+produced">KIP-825</a> + introduces "emit strategies" which are built into the aggregation operator directly to use the already existing + RocksDB store. <code>TimeWindowedKStream.emitStrategy(EmitStrategy)</code> and + <code>SessionWindowedKStream.emitStrategy(EmitStrategy)</code> allow to pick between "emit on window update" (default) + and "emit on window close" strategies. Additionally, a few new emit metrics are added, as well as a necessary + new method <code>SessionStore.findSessions(long, long)</code>. + </p> + + <p> + <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=211882832">KIP-834</a> allows to pause + and resume a Kafka Streams instance. Pausing implies that processing input records and executing punctuations will + be skipped; Kafka Streams will continue to poll to maintain its group membership and may commit offsets. + In addition to the new method <code>KafkaStreams.pause()</code> and <code>KafkaStreams.resume()</code>, it is also + supported to check if an instance is paused via <code>KafkaStreams.isPaused()</code> method. Review Comment: ```suggestion supported to check if an instance is paused via the <code>KafkaStreams.isPaused()</code> method. ``` ########## docs/ops.html: ########## @@ -3142,6 +3143,26 @@ <h5 class="anchor-heading"><a id="kafka_streams_node_monitoring" class="anchor-l <td>The total number of records that have been emitted downstream from suppression operation nodes.</td> <td>kafka.streams:type=stream-processor-node-metrics,thread-id=([-.\w]+),task-id=([-.\w]+),processor-node-id=([-.\w]+)</td> </tr> + <tr> + <td>emit-final-latency-max</td> + <td>The max latency to emit final records when it could be emitted.</td> Review Comment: Not clear what "it" refers to here. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org