mjsax commented on code in PR #16316: URL: https://github.com/apache/kafka/pull/16316#discussion_r1637372406
########## 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. Review Comment: These metrics are already added to the `ops.html` KS metrics section. -- 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