<strong>must do</strong> if the key and/or value types of the resulting <codeclass="docutils literal"><spanclass="pre">KGroupedStream</span></code> do not match the configured default
SerDes.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last"><strong>Grouping vs. Windowing:</strong>
A related operation is <aclass="reference internal"href="#streams-developer-guide-dsl-windowing"><spanclass="std std-ref">windowing</span></a>, which lets you control how to
“sub-group” the grouped records <em>of the same key</em> into so-called <em>windows</em> for stateful operations such as
@ -464,7 +464,7 @@
@@ -464,7 +464,7 @@
<strong>do</strong> if the key and/or value types of the resulting <codeclass="docutils literal"><spanclass="pre">KGroupedStream</span></code> or <codeclass="docutils literal"><spanclass="pre">KGroupedTable</span></code> do not match the
configured default SerDes.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last"><strong>Grouping vs. Windowing:</strong>
A related operation is <aclass="reference internal"href="#streams-developer-guide-dsl-windowing"><spanclass="std std-ref">windowing</span></a>, which lets you control how to
“sub-group” the grouped records <em>of the same key</em> into so-called <em>windows</em> for stateful operations such as
@ -1204,7 +1204,7 @@
@@ -1204,7 +1204,7 @@
</pre></div>
</div>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last"><strong>Impact of record caches</strong>:
For illustration purposes, the column “KTable <codeclass="docutils literal"><spanclass="pre">aggregated</span></code>” below shows the table’s state changes over time in a
very granular way. In practice, you would observe state changes in such a granular way only when
@ -1334,7 +1334,7 @@
@@ -1334,7 +1334,7 @@
</pre></div>
</div>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last"><strong>Impact of record caches</strong>:
For illustration purposes, the column “KTable <codeclass="docutils literal"><spanclass="pre">aggregated</span></code>” below shows the table’s state changes over time in a
very granular way. In practice, you would observe state changes in such a granular way only when
@ -1531,7 +1531,6 @@
@@ -1531,7 +1531,6 @@
<td>Not Supported</td>
<td>Not Supported</td>
<td>Not Supported</td>
<td>N/A</td>
</tr>
</tbody>
</table>
@ -1569,7 +1568,7 @@
@@ -1569,7 +1568,7 @@
each <codeclass="docutils literal"><spanclass="pre">KafkaStreams</span></code> instance, i.e. each instance has a full copy of the changelog stream. Further, a
<codeclass="docutils literal"><spanclass="pre">KeyValueMapper</span></code> allows for non-key based joins from the <codeclass="docutils literal"><spanclass="pre">KStream</span></code> to the <codeclass="docutils literal"><spanclass="pre">GlobalKTable</span></code>.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last"><strong>Kafka Streams partly verifies the co-partitioning requirement:</strong>
During the partition assignment step, i.e. at runtime, Kafka Streams verifies whether the number of partitions for
both sides of a join are the same. If they are not, a <codeclass="docutils literal"><spanclass="pre">TopologyBuilderException</span></code> (runtime exception) is being
@ -2691,7 +2690,7 @@
@@ -2691,7 +2690,7 @@
<aclass="reference internal"href="#streams-developer-guide-dsl-aggregating"><spanclass="std std-ref">aggregations</span></a> or <aclass="reference internal"href="#streams-developer-guide-dsl-joins"><spanclass="std std-ref">joins</span></a> into
so-called windows. Windows are tracked per record key.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last">A related operation is <aclass="reference internal"href="#streams-developer-guide-dsl-transformations-stateless"><spanclass="std std-ref">grouping</span></a>, which groups all
records that have the same key to ensure that data is properly partitioned (“keyed”) for subsequent operations.
Once grouped, windowing allows you to further sub-group the records of a key.</p>
@ -2776,7 +2775,7 @@ become t=300,000).</span></p>
@@ -2776,7 +2775,7 @@ become t=300,000).</span></p>
hopping window with a size 5 minutes and an advance interval of 1 minute. Since hopping windows can overlap – and in
general they do – a data record may belong to more than one such windows.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last"><strong>Hopping windows vs. sliding windows:</strong>
Hopping windows are sometimes called “sliding windows” in other stream processing tools. Kafka Streams follows the
terminology in academic literature, where the semantics of sliding windows are different to those of hopping windows.</p>
@ -3146,7 +3145,7 @@ t=5 (blue), which lead to a merge of sessions and an extension of a session, res
@@ -3146,7 +3145,7 @@ t=5 (blue), which lead to a merge of sessions and an extension of a session, res
</tbody>
</table>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last"><strong>When you want to write to systems other than Kafka:</strong>
Besides writing the data back to Kafka, you can also apply a
<aclass="reference internal"href="#streams-developer-guide-dsl-process"><spanclass="std std-ref">custom processor</span></a> as a stream sink at the end of the processing to, for
<p>You can also <aclass="reference internal"href="#streams-developer-guide-interactive-queries-custom-stores"><spanclass="std std-ref">implement your own QueryableStoreType</span></a> as described in section <aclass="reference internal"href="#streams-developer-guide-interactive-queries-custom-stores"><spanclass="std std-ref">Querying local custom state stores</span></a>.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last">Kafka Streams materializes one state store per stream partition. This means your application will potentially manage
many underlying state stores. The API enables you to query all of the underlying stores without having to know which
<spanid="streams-developer-guide-interactive-queries-custom-stores"></span><h3><aclass="toc-backref"href="#id6">Querying local custom state stores</a><aclass="headerlink"href="#querying-local-custom-state-stores"title="Permalink to this headline"></a></h3>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<p><b>Note</b></p>
<pclass="last">Only the <aclass="reference internal"href="processor-api.html#streams-developer-guide-processor-api"><spanclass="std std-ref">Processor API</span></a> supports custom state stores.</p>
</div>
<p>Before querying the custom state stores you must implement these interfaces:</p>
<pclass="last"><strong>Stateful processing with state stores:</strong>
The <codeclass="docutils literal"><spanclass="pre">WordCountProcessor</span></code> defined above can access the currently received record in its <codeclass="docutils literal"><spanclass="pre">process()</span></code> method, and it can
leverage <aclass="reference internal"href="#streams-developer-guide-state-store"><spanclass="std std-ref">state stores</span></a> to maintain processing states to, for example, remember recently