-
Notifications
You must be signed in to change notification settings - Fork 14k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-18026: KIP-1112, document new config and update the Streams upgrade guide #17906
base: trunk
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,12 @@ <h1>Upgrade Guide and API Changes</h1> | |
<p>For a table that shows Streams API compatibility with Kafka broker versions, see <a href="#streams_api_broker_compat">Broker Compatibility</a>.</p> | ||
|
||
<h3 class="anchor-heading"><a id="streams_notable_changes" class="anchor-link"></a><a href="#streams_notable_changes">Notable compatibility changes in past releases</a></h3> | ||
|
||
<p> | ||
Starting in version 4.0.0, Kafka Streams will only be compatible when running against brokers on version 2.1 | ||
or higher. Additionally, exactly-once semantics (EOS) will require brokers to be at least version 2.5. | ||
</p> | ||
|
||
<p> | ||
Downgrading from 3.5.x or newer version to 3.4.x or older version needs special attention: | ||
Since 3.5.0 release, Kafka Streams uses a new serialization format for repartition topics. | ||
|
@@ -155,6 +161,18 @@ <h3><a id="streams_api_changes_400" href="#streams_api_changes_400">Streams API | |
<code>TransformerSupplier</code>, <code>ValueTransformer</code>, and <code>ValueTransformerSupplier</code>. | ||
</p> | ||
|
||
<p> | ||
You can now configure your topology with a <code>ProcessorWrapper</code>, which allows you to access and optionally wrap/replace | ||
any processor in the topology by injecting an alternative <code>ProcessorSupplier</code> in its place. This can be used to peek | ||
records and access the processor context even for DSL operators, for example to implement a logging or tracing framework, or to | ||
aid in testing or debugging scenarios. You must implement the <code>ProcessorWrapper</code> interface and then pass the class | ||
or class name into the configs via the new <code>StreamsConfig#PROCESSOR_WRAPPER_CLASS_CONFIG</code> config. NOTE: this config is | ||
applied during the topology building phase, and therefore will not take effect unless the config is passed in when creating | ||
the StreamsBuilder (DSL) or Topology(PAPI) objects. You MUST use the StreamsBuilder/Topology constructor overload that | ||
accepts a TopologyConfig parameter for the <code>StreamsConfig#PROCESSOR_WRAPPER_CLASS_CONFIG</code> to be picked up. | ||
See <a href="https://cwiki.apache.org/confluence/x/TZCMEw">KIP-1112</a> for more details. | ||
</p> | ||
|
||
<h3><a id="streams_api_changes_390" href="#streams_api_changes_390">Streams API changes in 3.9.0</a></h3> | ||
|
||
<p> | ||
|
@@ -1634,27 +1652,30 @@ <h3 class="anchor-heading"><a id="streams_api_broker_compat" class="anchor-link" | |
<thead> | ||
<tr> | ||
<th></th> | ||
<th colspan="3">Kafka Broker (columns)</th> | ||
<th colspan="4">Kafka Broker (columns)</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>Kafka Streams API (rows)</td> | ||
<td>0.10.0.x</td> | ||
<td>0.10.1.x and 0.10.2.x</td> | ||
<td>0.11.0.x and<br>1.0.x and<br>1.1.x and<br>2.0.x and<br>2.1.x and<br>2.2.x and<br>2.3.x and<br>2.4.x and<br>2.5.x and<br>2.6.x and<br>2.7.x and<br>2.8.x and<br>3.0.x and<br>3.1.x and<br>3.2.x and<br>3.3.x and<br>3.4.x and<br>3.5.x and<br>3.6.x and<br>3.7.x</td> | ||
<td>0.11.0.x and<br>1.0.x and<br>1.1.x and<br>2.0.x</td> | ||
<td>2.1.x and<br>2.2.x and<br>2.3.x and<br>2.4.x and<br>2.5.x and<br>2.6.x and<br>2.7.x and<br>2.8.x and<br>3.0.x and<br>3.1.x and<br>3.2.x and<br>3.3.x and<br>3.4.x and<br>3.5.x and<br>3.6.x and<br>3.7.x and<br>3.8.x and<br>3.9.x and<br>4.0.x</td> | ||
</tr> | ||
<tr> | ||
<td>0.10.0.x</td> | ||
<td>compatible</td> | ||
<td>compatible</td> | ||
<td>compatible</td> | ||
<td>compatible</td> | ||
</tr> | ||
<tr> | ||
<td>0.10.1.x and 0.10.2.x</td> | ||
<td></td> | ||
<td>compatible</td> | ||
<td>compatible</td> | ||
<td>compatible</td> | ||
</tr> | ||
<tr> | ||
<td>0.11.0.x</td> | ||
|
@@ -1667,12 +1688,21 @@ <h3 class="anchor-heading"><a id="streams_api_broker_compat" class="anchor-link" | |
<td></td> | ||
<td>compatible with exactly-once turned off<br>(requires broker version 0.11.0.x or higher);<br>requires message format 0.10 or higher;<br>message headers are not supported<br>(requires broker version 0.11.0.x or higher<br>with message format 0.11 or higher)</td> | ||
<td>compatible; requires message format 0.10 or higher;<br>if message headers are used, message format 0.11<br>or higher required</td> | ||
<td>compatible</td> | ||
</tr> | ||
<tr> | ||
<td>2.2.1 and<br>2.3.x and<br>2.4.x and<br>2.5.x and<br>2.6.x and<br>2.7.x and<br>2.8.x and<br>3.0.x and<br>3.1.x and<br>3.2.x and<br>3.3.x and<br>3.4.x and<br>3.5.x and<br>3.6.x and<br>3.7.x</td> | ||
<td>2.2.1 and<br>2.3.x and<br>2.4.x and<br>2.5.x and<br>2.6.x and<br>2.7.x and<br>2.8.x and<br>3.0.x and<br>3.1.x and<br>3.2.x and<br>3.3.x and<br>3.4.x and<br>3.5.x and<br>3.6.x and<br>3.7.x and<br>3.8.x and<br>3.9.x</td> | ||
<td></td> | ||
<td></td> | ||
<td>compatible; requires message format 0.11 or higher;<br>enabling exactly-once v2 requires 2.4.x or higher</td> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mjsax is this right? I always thought eosv2 needed brokers to be 2.5 or higher, not 2.4. Am I misremembering this or is the matrix wrong? This error message could also be wrong I suppose but this log in StreamThread at least seems to agree it's 2.5:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok according to the KafkaProducer javadocs for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, EOSv2 does require 2.5 brokers. |
||
<td>compatible</td> | ||
</tr> | ||
<tr> | ||
<td>4.0.x</td> | ||
<td></td> | ||
<td></td> | ||
<td></td> | ||
<td>compatible with exactly-once turned off<br>(requires broker version 2.4.x or higher)</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ijuma just to confirm my reading of KIP-896, the change only affects older clients compatibility with newer brokers, not the other way around, right? In other words a 0.11 client could still run against a 4.0 broker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. According to KIP-896:
This means that broker version 4.x can only communicate with clients version 2.1 and above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct @chia7712. This raises the minimum version for everything to 2.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for confirming -- glad I checked 🙂