Skip to content

Commit d2467d3

Browse files
committed
MINOR: improve Kafka Streams transform upgrade docs (#21002)
We should also mention `flatTransformValues` method. Also adding new 4.1.1 release. Reviewers: Bill Bejeck <bill@confluent.io>
1 parent 659d379 commit d2467d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/streams/developer-guide/dsl-api.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3462,10 +3462,11 @@ <h3>
34623462
<p>The Processor API now serves as a unified replacement for all these methods. It simplifies the API surface
34633463
while maintaining support for both stateless and stateful operations.</p>
34643464

3465-
<p><b>CAUTION:</b> If you are using <code>KStream.transformValues()</code> and you have the "merge repartition topics"
3465+
<p><b>CAUTION:</b> If you are using <code>KStream.transformValues()</code> or <code>KStream.flatTransformValues()</code>
3466+
and you have the "merge repartition topics"
34663467
optimization enabled, rewriting your program to <code>KStream.processValues()</code> might not be safe due to
34673468
<a href="https://issues.apache.org/jira/browse/KAFKA-19668">KAFKA-19668</a>. For this case, you should not upgrade
3468-
to Kafka Streams 4.0.0 or 4.1.0, but use Kafka Streams 4.0.1 instead, which contains a fix.
3469+
to Kafka Streams 4.0.0 or 4.1.0, but use Kafka Streams 4.0.1 or 4.1.1 instead, which contain a fix.
34693470
Note, that the fix is not enabled by default for backward compatibility reasons, and you would need to
34703471
enable the fix by setting config <code>__enable.process.processValue.fix__ = true</code> and pass it
34713472
into <code>StreamsBuilder()</code> constructor.</p>
@@ -3680,6 +3681,8 @@ <h5 id="replacing-slang-in-text-messages-removal">Replacing Slang in Text Messag
36803681
}
36813682
}</code></pre>
36823683
<h5 id="cumulative-discounts-for-a-loyalty-program-removal">Cumulative Discounts for a Loyalty Program</h5>
3684+
<p>Below, methods <code>applyDiscountWithTransform</code> and <code>applyDiscountWithProcess</code> show how you can
3685+
migrate from <code>transform</code> to <code>process</code>.</p>
36833686
<pre class="line-numbers"><code class="language-java">public class CumulativeDiscountsForALoyaltyProgramExample {
36843687
private static final double DISCOUNT_THRESHOLD = 100.0;
36853688
private static final String CUSTOMER_SPENDING_STORE = &quot;customer-spending-store&quot;;

0 commit comments

Comments
 (0)