<h3><aid="streams_api_changes_100"href="#streams_api_changes_100">Streams API changes in 1.0.0</a></h3>
<!-- TODO: 161, 167, 173, 182 -->
<p>
With 1.0 a major API refactoring was accomplished and the new API is cleaner and easier to use.
@ -84,36 +83,33 @@
@@ -84,36 +83,33 @@
and can be obtained by calling <code>Topology#describe()</code>.
An example using this new API is shown in the <ahref="/{{version}}/documentation/streams/quickstart">quickstart section</a>.
</p>
<p>
With the introduction of <ahref="https://cwiki.apache.org/confluence/display/KAFKA/KIP-202+Move+merge%28%29+from+StreamsBuilder+to+KStream">KIP-202</a>
a new method <code>merge()</code> has been created in <code>KStream</code> as the StreamsBuilder class's <code>StreamsBuilder#merge()</code> has been removed.
The method signature was also changed, too: instead of providing multiple <code>KStream</code>s into the method at the once, only a single <code>KStream</code> is accepted.
</p>
<p>
New methods in <code>KafkaStreams</code>:
New methods in <code>KStream</code>:
</p>
<ul>
<li> retrieve the current runtime information about the local threads via <code>#localThreadsMetadata()</code></li>
<li>With the introduction of <ahref="https://cwiki.apache.org/confluence/display/KAFKA/KIP-202+Move+merge%28%29+from+StreamsBuilder+to+KStream">KIP-202</a>
a new method <code>merge()</code> has been created in <code>KStream</code> as the StreamsBuilder class's <code>StreamsBuilder#merge()</code> has been removed.
The method signature was also changed, too: instead of providing multiple <code>KStream</code>s into the method at the once, only a single <code>KStream</code> is accepted.
<li>retrieve the current runtime information about the local threads via <code>#localThreadsMetadata()</code></li>
<li>observe the restoration of all state stores via <code>#setGlobalStateRestoreListener()</code>, in which users can provide their customized implementation of the <code>org.apache.kafka.streams.processor.StateRestoreListener</code> interface</li>
</ul>
<p>
Previously the above methods were used to return static and runtime information.
They have been deprecated in favor of using the new classes/methods <code>#localThreadsMetadata()</code> / <code>ThreadMetadata</code> (returning runtime information) and
More deprecated methods in <code>KafkaStreams</code>:
Deprecated methods in <code>KafkaStreams</code>:
</p>
<ul>
<li><code>toString()</code>, <code>toString(final String indent)</code> were previously used to return static and runtime information.
They have been deprecated in favor of using the new classes/methods <code>#localThreadsMetadata()</code> / <code>ThreadMetadata</code> (returning runtime information) and
<li>With the introduction of <ahref="https://cwiki.apache.org/confluence/display/KAFKA/KIP-182%3A+Reduce+Streams+DSL+overloads+and+allow+easier+use+of+custom+storage+engines">KIP-182</a>
you should no longer pass in <code>Serde</code> to <code>KStream#print</code> operations.
If you can't rely on using <code>toString</code> to print your keys an values, you should instead you provide a custom <code>KeyValueMapper</code> via the <code>Printed#withKeyValueMapper</code> call.
@ -124,6 +120,7 @@
@@ -124,6 +120,7 @@
Note: the previous aggregate functions on <code>KGroupedStream</code> still work, but have been deprecated.
</li>
</ul>
<p>
Modified methods in <code>Processor</code>:
</p>
@ -154,6 +151,13 @@
@@ -154,6 +151,13 @@
Detailed metrics sensor can be found in the <ahref="#kafka_streams_monitoring">Streams Monitoring</a> section.
</p>
<p>
The introduction of <ahref="https://cwiki.apache.org/confluence/display/KAFKA/KIP-161%3A+streams+deserialization+exception+handlers">KIP-161</a>
enables you to provide a default exception handler for deserialization errors when reading data from Kafka rather than throwing the exception all the way out of your streams application.
You can provide the configs via the <code>StreamsConfig</code> as <code>StreamsConfig#DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG</code>.
The specified handler must implement the <code>org.apache.kafka.streams.errors.DeserializationExceptionHandler</code> interface.
</p>
<p>
The introduction of <ahref="https://cwiki.apache.org/confluence/display/KAFKA/KIP-173%3A+Add+prefix+to+StreamsConfig+to+enable+setting+default+internal+topic+configs">KIP-173</a>
enables you to provide topic configuration parameters for any topics created by Kafka Streams.