| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>StreamsBuilder (kafka 3.5.2 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.kafka.streams, class: StreamsBuilder"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-3.5.1.min.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field-summary">Field</a> | </li> |
| <li><a href="#constructor-summary">Constr</a> | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li><a href="#field-detail">Field</a> | </li> |
| <li><a href="#constructor-detail">Constr</a> | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.kafka.streams</a></div> |
| <h1 title="Class StreamsBuilder" class="title">Class StreamsBuilder</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.kafka.streams.StreamsBuilder</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">StreamsBuilder</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div> |
| <div class="block"><code>StreamsBuilder</code> provide the high-level Kafka Streams DSL to specify a Kafka Streams topology. |
| |
| <p> |
| It is a requirement that the processing logic (<a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a>) be defined in a deterministic way, |
| as in, the order in which all operators are added must be predictable and the same across all application |
| instances. |
| Topologies are only identical if all operators are added in the same order. |
| If different <a href="KafkaStreams.html" title="class in org.apache.kafka.streams"><code>KafkaStreams</code></a> instances of the same application build different topologies the result may be |
| incompatible runtime code and unexpected results or errors</div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a></li> |
| <li><a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a></li> |
| <li><a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a></li> |
| <li><a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <li> |
| <section class="field-summary" id="field-summary"> |
| <h2>Field Summary</h2> |
| <div class="caption"><span>Fields</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Field</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>protected final org.apache.kafka.streams.kstream.internals.InternalStreamsBuilder</code></div> |
| <div class="col-second even-row-color"><code><a href="#internalStreamsBuilder" class="member-name-link">internalStreamsBuilder</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>protected final org.apache.kafka.streams.processor.internals.InternalTopologyBuilder</code></div> |
| <div class="col-second odd-row-color"><code><a href="#internalTopologyBuilder" class="member-name-link">internalTopologyBuilder</a></code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">The topology's internal builder.</div> |
| </div> |
| <div class="col-first even-row-color"><code>protected final <a href="Topology.html" title="class in org.apache.kafka.streams">Topology</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#topology" class="member-name-link">topology</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">The actual topology that is constructed by this StreamsBuilder.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">StreamsBuilder</a>()</code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(org.apache.kafka.streams.TopologyConfig)" class="member-name-link">StreamsBuilder</a><wbr>(<a href="TopologyConfig.html" title="class in org.apache.kafka.streams">TopologyConfig</a> topologyConfigs)</code></div> |
| <div class="col-last odd-row-color"> |
| <div class="block">Create a <code>StreamsBuilder</code> instance.</div> |
| </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab6', 3)" class="table-tab">Deprecated Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><K,<wbr> |
| V> <a href="StreamsBuilder.html" title="class in org.apache.kafka.streams">StreamsBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#addGlobalStore(org.apache.kafka.streams.state.StoreBuilder,java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.processor.ProcessorSupplier)" class="member-name-link">addGlobalStore</a><wbr>(<a href="state/StoreBuilder.html" title="interface in org.apache.kafka.streams.state">StoreBuilder</a><?> storeBuilder, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed, |
| <a href="processor/ProcessorSupplier.html" title="interface in org.apache.kafka.streams.processor">ProcessorSupplier</a><K,<wbr>V> stateUpdateSupplier)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4 method-summary-table-tab6"> |
| <div class="block"><span class="deprecated-label">Deprecated.</span> |
| <div class="deprecation-comment">Since 2.7.0; use <a href="#addGlobalStore(org.apache.kafka.streams.state.StoreBuilder,java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.processor.api.ProcessorSupplier)"><code>addGlobalStore(StoreBuilder, String, Consumed, ProcessorSupplier)</code></a> instead.</div> |
| </div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><KIn,<wbr> |
| VIn> <a href="StreamsBuilder.html" title="class in org.apache.kafka.streams">StreamsBuilder</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addGlobalStore(org.apache.kafka.streams.state.StoreBuilder,java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.processor.api.ProcessorSupplier)" class="member-name-link">addGlobalStore</a><wbr>(<a href="state/StoreBuilder.html" title="interface in org.apache.kafka.streams.state">StoreBuilder</a><?> storeBuilder, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><KIn,<wbr>VIn> consumed, |
| <a href="processor/api/ProcessorSupplier.html" title="interface in org.apache.kafka.streams.processor.api">ProcessorSupplier</a><KIn,<wbr>VIn,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>> stateUpdateSupplier)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds a global <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> to the topology.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="StreamsBuilder.html" title="class in org.apache.kafka.streams">StreamsBuilder</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addStateStore(org.apache.kafka.streams.state.StoreBuilder)" class="member-name-link">addStateStore</a><wbr>(<a href="state/StoreBuilder.html" title="interface in org.apache.kafka.streams.state">StoreBuilder</a><?> builder)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds a state store to the underlying <a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Topology.html" title="class in org.apache.kafka.streams">Topology</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#build()" class="member-name-link">build</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the <a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a> that represents the specified processing logic.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="Topology.html" title="class in org.apache.kafka.streams">Topology</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#build(java.util.Properties)" class="member-name-link">build</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.html" title="class or interface in java.util" class="external-link">Properties</a> props)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the <a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a> that represents the specified processing logic and accepts |
| a <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.html" title="class or interface in java.util" class="external-link"><code>Properties</code></a> instance used to indicate whether to optimize topology or not.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>protected <a href="Topology.html" title="class in org.apache.kafka.streams">Topology</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getNewTopology(org.apache.kafka.streams.TopologyConfig)" class="member-name-link">getNewTopology</a><wbr>(<a href="TopologyConfig.html" title="class in org.apache.kafka.streams">TopologyConfig</a> topologyConfigs)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream">GlobalKTable</a><K,<wbr>V></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#globalTable(java.lang.String)" class="member-name-link">globalTable</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream">GlobalKTable</a><K,<wbr>V></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#globalTable(java.lang.String,org.apache.kafka.streams.kstream.Consumed)" class="member-name-link">globalTable</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream">GlobalKTable</a><K,<wbr>V></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#globalTable(java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.kstream.Materialized)" class="member-name-link">globalTable</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed, |
| <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream">Materialized</a><K,<wbr>V,<wbr><a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a><org.apache.kafka.common.utils.Bytes,<wbr>byte[]>> materialized)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream">GlobalKTable</a><K,<wbr>V></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#globalTable(java.lang.String,org.apache.kafka.streams.kstream.Materialized)" class="member-name-link">globalTable</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream">Materialized</a><K,<wbr>V,<wbr><a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a><org.apache.kafka.common.utils.Bytes,<wbr>byte[]>> materialized)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#stream(java.lang.String)" class="member-name-link">stream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topic.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#stream(java.lang.String,org.apache.kafka.streams.kstream.Consumed)" class="member-name-link">stream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topic.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#stream(java.util.Collection)" class="member-name-link">stream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> topics)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topics.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#stream(java.util.Collection,org.apache.kafka.streams.kstream.Consumed)" class="member-name-link">stream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> topics, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topics.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#stream(java.util.regex.Pattern)" class="member-name-link">stream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html" title="class or interface in java.util.regex" class="external-link">Pattern</a> topicPattern)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topic pattern.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#stream(java.util.regex.Pattern,org.apache.kafka.streams.kstream.Consumed)" class="member-name-link">stream</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html" title="class or interface in java.util.regex" class="external-link">Pattern</a> topicPattern, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topic pattern.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream">KTable</a><K,<wbr>V></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#table(java.lang.String)" class="member-name-link">table</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream">KTable</a><K,<wbr>V></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#table(java.lang.String,org.apache.kafka.streams.kstream.Consumed)" class="member-name-link">table</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream">KTable</a><K,<wbr>V></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#table(java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.kstream.Materialized)" class="member-name-link">table</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed, |
| <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream">Materialized</a><K,<wbr>V,<wbr><a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a><org.apache.kafka.common.utils.Bytes,<wbr>byte[]>> materialized)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><K,<wbr> |
| V> <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream">KTable</a><K,<wbr>V></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#table(java.lang.String,org.apache.kafka.streams.kstream.Materialized)" class="member-name-link">table</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream">Materialized</a><K,<wbr>V,<wbr><a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a><org.apache.kafka.common.utils.Bytes,<wbr>byte[]>> materialized)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Create a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="topology"> |
| <h3>topology</h3> |
| <div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type"><a href="Topology.html" title="class in org.apache.kafka.streams">Topology</a></span> <span class="element-name">topology</span></div> |
| <div class="block">The actual topology that is constructed by this StreamsBuilder.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="internalTopologyBuilder"> |
| <h3>internalTopologyBuilder</h3> |
| <div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type">org.apache.kafka.streams.processor.internals.InternalTopologyBuilder</span> <span class="element-name">internalTopologyBuilder</span></div> |
| <div class="block">The topology's internal builder.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="internalStreamsBuilder"> |
| <h3>internalStreamsBuilder</h3> |
| <div class="member-signature"><span class="modifiers">protected final</span> <span class="return-type">org.apache.kafka.streams.kstream.internals.InternalStreamsBuilder</span> <span class="element-name">internalStreamsBuilder</span></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>StreamsBuilder</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">StreamsBuilder</span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="<init>(org.apache.kafka.streams.TopologyConfig)"> |
| <h3>StreamsBuilder</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name">StreamsBuilder</span><wbr><span class="parameters">(<a href="TopologyConfig.html" title="class in org.apache.kafka.streams">TopologyConfig</a> topologyConfigs)</span></div> |
| <div class="block">Create a <code>StreamsBuilder</code> instance.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topologyConfigs</code> - the streams configs that apply at the topology level. Please refer to <a href="TopologyConfig.html" title="class in org.apache.kafka.streams"><code>TopologyConfig</code></a> for more detail</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="getNewTopology(org.apache.kafka.streams.TopologyConfig)"> |
| <h3>getNewTopology</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type"><a href="Topology.html" title="class in org.apache.kafka.streams">Topology</a></span> <span class="element-name">getNewTopology</span><wbr><span class="parameters">(<a href="TopologyConfig.html" title="class in org.apache.kafka.streams">TopologyConfig</a> topologyConfigs)</span></div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="stream(java.lang.String)"> |
| <h3>stream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></span> <span class="element-name">stream</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic)</span></div> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topic. |
| The default <code>"auto.offset.reset"</code> strategy, default <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a>, and default key and value |
| deserializers as specified in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>config</code></a> are used. |
| <p> |
| If multiple topics are specified there is no ordering guarantee for records from different topics. |
| <p> |
| Note that the specified input topic must be partitioned by key. |
| If this is not the case it is the user's responsibility to repartition the data before any key based operation |
| (like aggregation or join) is applied to the returned <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="stream(java.lang.String,org.apache.kafka.streams.kstream.Consumed)"> |
| <h3>stream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></span> <span class="element-name">stream</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</span></div> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topic. |
| The <code>"auto.offset.reset"</code> strategy, <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a>, key and value deserializers |
| are defined by the options in <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> are used. |
| <p> |
| Note that the specified input topic must be partitioned by key. |
| If this is not the case it is the user's responsibility to repartition the data before any key based operation |
| (like aggregation or join) is applied to the returned <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic names; cannot be <code>null</code></dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters</dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="stream(java.util.Collection)"> |
| <h3>stream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></span> <span class="element-name">stream</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> topics)</span></div> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topics. |
| The default <code>"auto.offset.reset"</code> strategy, default <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a>, and default key and value |
| deserializers as specified in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>config</code></a> are used. |
| <p> |
| If multiple topics are specified there is no ordering guarantee for records from different topics. |
| <p> |
| Note that the specified input topics must be partitioned by key. |
| If this is not the case it is the user's responsibility to repartition the data before any key based operation |
| (like aggregation or join) is applied to the returned <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topics</code> - the topic names; must contain at least one topic name</dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> for the specified topics</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="stream(java.util.Collection,org.apache.kafka.streams.kstream.Consumed)"> |
| <h3>stream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></span> <span class="element-name">stream</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>> topics, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</span></div> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topics. |
| The <code>"auto.offset.reset"</code> strategy, <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a>, key and value deserializers |
| are defined by the options in <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> are used. |
| <p> |
| If multiple topics are specified there is no ordering guarantee for records from different topics. |
| <p> |
| Note that the specified input topics must be partitioned by key. |
| If this is not the case it is the user's responsibility to repartition the data before any key based operation |
| (like aggregation or join) is applied to the returned <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topics</code> - the topic names; must contain at least one topic name</dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters</dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> for the specified topics</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="stream(java.util.regex.Pattern)"> |
| <h3>stream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></span> <span class="element-name">stream</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html" title="class or interface in java.util.regex" class="external-link">Pattern</a> topicPattern)</span></div> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topic pattern. |
| The default <code>"auto.offset.reset"</code> strategy, default <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a>, and default key and value |
| deserializers as specified in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>config</code></a> are used. |
| <p> |
| If multiple topics are matched by the specified pattern, the created <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> will read data from all of |
| them and there is no ordering guarantee between records from different topics. This also means that the work |
| will not be parallelized for multiple topics, and the number of tasks will scale with the maximum partition |
| count of any matching topic rather than the total number of partitions across all topics. |
| <p> |
| Note that the specified input topics must be partitioned by key. |
| If this is not the case it is the user's responsibility to repartition the data before any key based operation |
| (like aggregation or join) is applied to the returned <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topicPattern</code> - the pattern to match for topic names</dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> for topics matching the regex pattern.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="stream(java.util.regex.Pattern,org.apache.kafka.streams.kstream.Consumed)"> |
| <h3>stream</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream">KStream</a><K,<wbr>V></span> <span class="element-name">stream</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/regex/Pattern.html" title="class or interface in java.util.regex" class="external-link">Pattern</a> topicPattern, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</span></div> |
| <div class="block">Create a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> from the specified topic pattern. |
| The <code>"auto.offset.reset"</code> strategy, <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a>, key and value deserializers |
| are defined by the options in <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> are used. |
| <p> |
| If multiple topics are matched by the specified pattern, the created <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> will read data from all of |
| them and there is no ordering guarantee between records from different topics. This also means that the work |
| will not be parallelized for multiple topics, and the number of tasks will scale with the maximum partition |
| count of any matching topic rather than the total number of partitions across all topics. |
| <p> |
| Note that the specified input topics must be partitioned by key. |
| If this is not the case it is the user's responsibility to repartition the data before any key based operation |
| (like aggregation or join) is applied to the returned <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topicPattern</code> - the pattern to match for topic names</dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters</dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KStream</code></a> for topics matching the regex pattern.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="table(java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.kstream.Materialized)"> |
| <h3>table</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream">KTable</a><K,<wbr>V></span> <span class="element-name">table</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed, |
| <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream">Materialized</a><K,<wbr>V,<wbr><a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a><org.apache.kafka.common.utils.Bytes,<wbr>byte[]>> materialized)</span></div> |
| <div class="block">Create a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic. |
| The <code>"auto.offset.reset"</code> strategy, <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a>, key and value deserializers |
| are defined by the options in <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> are used. |
| Input <a href="KeyValue.html" title="class in org.apache.kafka.streams"><code>records</code></a> with <code>null</code> key will be dropped. |
| <p> |
| Note that the specified input topic must be partitioned by key. |
| If this is not the case the returned <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> will be corrupted. |
| <p> |
| The resulting <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> will be materialized in a local <a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> using the given |
| <code>Materialized</code> instance. |
| An internal changelog topic is created by default. Because the source topic can |
| be used for recovery, you can avoid creating the changelog topic by setting |
| the <code>"topology.optimization"</code> to <code>"all"</code> in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a>. |
| <p> |
| You should only specify serdes in the <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> instance as these will also be used to overwrite the |
| serdes in <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a>, i.e., |
| <pre> <code> |
| streamBuilder.table(topic, Consumed.with(Serde.String(), Serde.String()), Materialized.<String, String, KeyValueStore<Bytes, byte[]>as(storeName)) |
| </code> |
| </pre> |
| To query the local <a href="state/ReadOnlyKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>ReadOnlyKeyValueStore</code></a> it must be obtained via |
| <a href="KafkaStreams.html#store(org.apache.kafka.streams.StoreQueryParameters)"><code>KafkaStreams#store(...)</code></a>: |
| <pre><code> |
| KafkaStreams streams = ... |
| ReadOnlyKeyValueStore<K, ValueAndTimestamp<V>> localStore = streams.store(queryableStoreName, QueryableStoreTypes.<K, ValueAndTimestamp<V>>timestampedKeyValueStore()); |
| K key = "some-key"; |
| ValueAndTimestamp<V> valueForKey = localStore.get(key); // key must be local (application state is shared over all running Kafka Streams instances) |
| </code></pre> |
| For non-local keys, a custom RPC mechanism must be implemented using <a href="KafkaStreams.html#metadataForAllStreamsClients()"><code>KafkaStreams.metadataForAllStreamsClients()</code></a> to |
| query the value of the key on a parallel running instance of your Kafka Streams application.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters; cannot be <code>null</code></dd> |
| <dd><code>materialized</code> - the instance of <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a> used to materialize a state store; cannot be <code>null</code></dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="table(java.lang.String)"> |
| <h3>table</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream">KTable</a><K,<wbr>V></span> <span class="element-name">table</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic)</span></div> |
| <div class="block">Create a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic. |
| The default <code>"auto.offset.reset"</code> strategy and default key and value deserializers as specified in the |
| <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>config</code></a> are used. |
| Input <a href="KeyValue.html" title="class in org.apache.kafka.streams"><code>records</code></a> with <code>null</code> key will be dropped. |
| <p> |
| Note that the specified input topics must be partitioned by key. |
| If this is not the case the returned <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> will be corrupted. |
| <p> |
| The resulting <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> will be materialized in a local <a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> with an internal |
| store name. Note that store name may not be queryable through Interactive Queries. |
| An internal changelog topic is created by default. Because the source topic can |
| be used for recovery, you can avoid creating the changelog topic by setting |
| the <code>"topology.optimization"</code> to <code>"all"</code> in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="table(java.lang.String,org.apache.kafka.streams.kstream.Consumed)"> |
| <h3>table</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream">KTable</a><K,<wbr>V></span> <span class="element-name">table</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</span></div> |
| <div class="block">Create a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic. |
| The <code>"auto.offset.reset"</code> strategy, <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a>, key and value deserializers |
| are defined by the options in <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> are used. |
| Input <a href="KeyValue.html" title="class in org.apache.kafka.streams"><code>records</code></a> with <code>null</code> key will be dropped. |
| <p> |
| Note that the specified input topics must be partitioned by key. |
| If this is not the case the returned <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> will be corrupted. |
| <p> |
| The resulting <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> will be materialized in a local <a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> with an internal |
| store name. Note that store name may not be queryable through Interactive Queries. |
| An internal changelog topic is created by default. Because the source topic can |
| be used for recovery, you can avoid creating the changelog topic by setting |
| the <code>"topology.optimization"</code> to <code>"all"</code> in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters; cannot be <code>null</code></dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="table(java.lang.String,org.apache.kafka.streams.kstream.Materialized)"> |
| <h3>table</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream">KTable</a><K,<wbr>V></span> <span class="element-name">table</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream">Materialized</a><K,<wbr>V,<wbr><a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a><org.apache.kafka.common.utils.Bytes,<wbr>byte[]>> materialized)</span></div> |
| <div class="block">Create a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic. |
| The default <code>"auto.offset.reset"</code> strategy as specified in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>config</code></a> are used. |
| Key and value deserializers as defined by the options in <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a> are used. |
| Input <a href="KeyValue.html" title="class in org.apache.kafka.streams"><code>records</code></a> with <code>null</code> key will be dropped. |
| <p> |
| Note that the specified input topics must be partitioned by key. |
| If this is not the case the returned <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> will be corrupted. |
| <p> |
| The resulting <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> will be materialized in a local <a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> using the <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a> instance. |
| An internal changelog topic is created by default. Because the source topic can |
| be used for recovery, you can avoid creating the changelog topic by setting |
| the <code>"topology.optimization"</code> to <code>"all"</code> in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dd><code>materialized</code> - the instance of <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a> used to materialize a state store; cannot be <code>null</code></dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="globalTable(java.lang.String,org.apache.kafka.streams.kstream.Consumed)"> |
| <h3>globalTable</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream">GlobalKTable</a><K,<wbr>V></span> <span class="element-name">globalTable</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed)</span></div> |
| <div class="block">Create a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic. |
| Input <a href="KeyValue.html" title="class in org.apache.kafka.streams"><code>records</code></a> with <code>null</code> key will be dropped. |
| <p> |
| The resulting <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> will be materialized in a local <a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> with an internal |
| store name. Note that store name may not be queryable through Interactive Queries. |
| No internal changelog topic is created since the original input topic can be used for recovery (cf. |
| methods of <a href="kstream/KGroupedStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KGroupedStream</code></a> and <a href="kstream/KGroupedTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KGroupedTable</code></a> that return a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a>). |
| <p> |
| Note that <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> always applies <code>"auto.offset.reset"</code> strategy <code>"earliest"</code> |
| regardless of the specified value in <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a> or <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a>. |
| Furthermore, <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> cannot be a <a href="state/VersionedBytesStoreSupplier.html" title="interface in org.apache.kafka.streams.state"><code>versioned state store</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters</dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="globalTable(java.lang.String)"> |
| <h3>globalTable</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream">GlobalKTable</a><K,<wbr>V></span> <span class="element-name">globalTable</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic)</span></div> |
| <div class="block">Create a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic. |
| The default key and value deserializers as specified in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>config</code></a> are used. |
| Input <a href="KeyValue.html" title="class in org.apache.kafka.streams"><code>records</code></a> with <code>null</code> key will be dropped. |
| <p> |
| The resulting <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> will be materialized in a local <a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> with an internal |
| store name. Note that store name may not be queryable through Interactive Queries. |
| No internal changelog topic is created since the original input topic can be used for recovery (cf. |
| methods of <a href="kstream/KGroupedStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KGroupedStream</code></a> and <a href="kstream/KGroupedTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KGroupedTable</code></a> that return a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a>). |
| <p> |
| Note that <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> always applies <code>"auto.offset.reset"</code> strategy <code>"earliest"</code> |
| regardless of the specified value in <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a>. |
| Furthermore, <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> cannot be a <a href="state/VersionedBytesStoreSupplier.html" title="interface in org.apache.kafka.streams.state"><code>versioned state store</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="globalTable(java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.kstream.Materialized)"> |
| <h3>globalTable</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream">GlobalKTable</a><K,<wbr>V></span> <span class="element-name">globalTable</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed, |
| <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream">Materialized</a><K,<wbr>V,<wbr><a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a><org.apache.kafka.common.utils.Bytes,<wbr>byte[]>> materialized)</span></div> |
| <div class="block">Create a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic. |
| |
| Input <a href="KeyValue.html" title="class in org.apache.kafka.streams"><code>KeyValue</code></a> pairs with <code>null</code> key will be dropped. |
| <p> |
| The resulting <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> will be materialized in a local <a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> configured with |
| the provided instance of <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a>. |
| However, no internal changelog topic is created since the original input topic can be used for recovery (cf. |
| methods of <a href="kstream/KGroupedStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KGroupedStream</code></a> and <a href="kstream/KGroupedTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KGroupedTable</code></a> that return a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a>). |
| <p> |
| You should only specify serdes in the <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> instance as these will also be used to overwrite the |
| serdes in <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a>, i.e., |
| <pre> <code> |
| streamBuilder.globalTable(topic, Consumed.with(Serde.String(), Serde.String()), Materialized.<String, String, KeyValueStore<Bytes, byte[]>as(storeName)) |
| </code> |
| </pre> |
| To query the local <a href="state/ReadOnlyKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>ReadOnlyKeyValueStore</code></a> it must be obtained via |
| <a href="KafkaStreams.html#store(org.apache.kafka.streams.StoreQueryParameters)"><code>KafkaStreams#store(...)</code></a>: |
| <pre><code> |
| KafkaStreams streams = ... |
| ReadOnlyKeyValueStore<K, ValueAndTimestamp<V>> localStore = streams.store(queryableStoreName, QueryableStoreTypes.<K, ValueAndTimestamp<V>>timestampedKeyValueStore()); |
| K key = "some-key"; |
| ValueAndTimestamp<V> valueForKey = localStore.get(key); |
| </code></pre> |
| Note that <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> always applies <code>"auto.offset.reset"</code> strategy <code>"earliest"</code> |
| regardless of the specified value in <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a> or <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a>. |
| Furthermore, <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> cannot be a <a href="state/VersionedBytesStoreSupplier.html" title="interface in org.apache.kafka.streams.state"><code>versioned state store</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters; can't be <code>null</code></dd> |
| <dd><code>materialized</code> - the instance of <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a> used to materialize a state store; cannot be <code>null</code></dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="globalTable(java.lang.String,org.apache.kafka.streams.kstream.Materialized)"> |
| <h3>globalTable</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream">GlobalKTable</a><K,<wbr>V></span> <span class="element-name">globalTable</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream">Materialized</a><K,<wbr>V,<wbr><a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state">KeyValueStore</a><org.apache.kafka.common.utils.Bytes,<wbr>byte[]>> materialized)</span></div> |
| <div class="block">Create a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic. |
| |
| Input <a href="KeyValue.html" title="class in org.apache.kafka.streams"><code>KeyValue</code></a> pairs with <code>null</code> key will be dropped. |
| <p> |
| The resulting <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> will be materialized in a local <a href="state/KeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>KeyValueStore</code></a> configured with |
| the provided instance of <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a>. |
| However, no internal changelog topic is created since the original input topic can be used for recovery (cf. |
| methods of <a href="kstream/KGroupedStream.html" title="interface in org.apache.kafka.streams.kstream"><code>KGroupedStream</code></a> and <a href="kstream/KGroupedTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KGroupedTable</code></a> that return a <a href="kstream/KTable.html" title="interface in org.apache.kafka.streams.kstream"><code>KTable</code></a>). |
| <p> |
| To query the local <a href="state/ReadOnlyKeyValueStore.html" title="interface in org.apache.kafka.streams.state"><code>ReadOnlyKeyValueStore</code></a> it must be obtained via |
| <a href="KafkaStreams.html#store(org.apache.kafka.streams.StoreQueryParameters)"><code>KafkaStreams#store(...)</code></a>: |
| <pre><code> |
| KafkaStreams streams = ... |
| ReadOnlyKeyValueStore<K, ValueAndTimestamp<V>> localStore = streams.store(queryableStoreName, QueryableStoreTypes.<K, ValueAndTimestamp<V>>timestampedKeyValueStore()); |
| K key = "some-key"; |
| ValueAndTimestamp<V> valueForKey = localStore.get(key); |
| </code></pre> |
| Note that <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> always applies <code>"auto.offset.reset"</code> strategy <code>"earliest"</code> |
| regardless of the specified value in <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>StreamsConfig</code></a>. |
| Furthermore, <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> cannot be a <a href="state/VersionedBytesStoreSupplier.html" title="interface in org.apache.kafka.streams.state"><code>versioned state store</code></a>.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>topic</code> - the topic name; cannot be <code>null</code></dd> |
| <dd><code>materialized</code> - the instance of <a href="kstream/Materialized.html" title="class in org.apache.kafka.streams.kstream"><code>Materialized</code></a> used to materialize a state store; cannot be <code>null</code></dd> |
| <dt>Returns:</dt> |
| <dd>a <a href="kstream/GlobalKTable.html" title="interface in org.apache.kafka.streams.kstream"><code>GlobalKTable</code></a> for the specified topic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addStateStore(org.apache.kafka.streams.state.StoreBuilder)"> |
| <h3>addStateStore</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="StreamsBuilder.html" title="class in org.apache.kafka.streams">StreamsBuilder</a></span> <span class="element-name">addStateStore</span><wbr><span class="parameters">(<a href="state/StoreBuilder.html" title="interface in org.apache.kafka.streams.state">StoreBuilder</a><?> builder)</span></div> |
| <div class="block">Adds a state store to the underlying <a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a>. |
| <p> |
| It is required to connect state stores to <a href="processor/api/Processor.html" title="interface in org.apache.kafka.streams.processor.api"><code>Processors</code></a>, |
| <a href="kstream/Transformer.html" title="interface in org.apache.kafka.streams.kstream"><code>Transformers</code></a>, |
| or <a href="kstream/ValueTransformer.html" title="interface in org.apache.kafka.streams.kstream"><code>ValueTransformers</code></a> before they can be used.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>builder</code> - the builder used to obtain this state store <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> instance</dd> |
| <dt>Returns:</dt> |
| <dd>itself</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="errors/TopologyException.html" title="class in org.apache.kafka.streams.errors">TopologyException</a></code> - if state store supplier is already added</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addGlobalStore(org.apache.kafka.streams.state.StoreBuilder,java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.processor.ProcessorSupplier)"> |
| <h3>addGlobalStore</h3> |
| <div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a> |
| </span><span class="modifiers">public</span> <span class="type-parameters"><K,<wbr> |
| V></span> <span class="return-type"><a href="StreamsBuilder.html" title="class in org.apache.kafka.streams">StreamsBuilder</a></span> <span class="element-name">addGlobalStore</span><wbr><span class="parameters">(<a href="state/StoreBuilder.html" title="interface in org.apache.kafka.streams.state">StoreBuilder</a><?> storeBuilder, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><K,<wbr>V> consumed, |
| <a href="processor/ProcessorSupplier.html" title="interface in org.apache.kafka.streams.processor">ProcessorSupplier</a><K,<wbr>V> stateUpdateSupplier)</span></div> |
| <div class="deprecation-block"><span class="deprecated-label">Deprecated.</span> |
| <div class="deprecation-comment">Since 2.7.0; use <a href="#addGlobalStore(org.apache.kafka.streams.state.StoreBuilder,java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.processor.api.ProcessorSupplier)"><code>addGlobalStore(StoreBuilder, String, Consumed, ProcessorSupplier)</code></a> instead.</div> |
| </div> |
| <div class="block">Adds a global <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> to the topology. |
| The <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> sources its data from all partitions of the provided input topic. |
| There will be exactly one instance of this <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> per Kafka Streams instance. |
| <p> |
| A <code>SourceNode</code> with the provided sourceName will be added to consume the data arriving from the partitions |
| of the input topic. |
| <p> |
| The provided <a href="processor/ProcessorSupplier.html" title="interface in org.apache.kafka.streams.processor"><code>ProcessorSupplier</code></a> will be used to create an <code>ProcessorNode</code> that will receive all |
| records forwarded from the <code>SourceNode</code>. NOTE: you should not use the <code>Processor</code> to insert transformed records into |
| the global state store. This store uses the source topic as changelog and during restore will insert records directly |
| from the source. |
| This <code>ProcessorNode</code> should be used to keep the <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> up-to-date. |
| The default <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a> as specified in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>config</code></a> is used. |
| <p> |
| It is not required to connect a global store to <a href="processor/api/Processor.html" title="interface in org.apache.kafka.streams.processor.api"><code>Processors</code></a>, |
| <a href="kstream/Transformer.html" title="interface in org.apache.kafka.streams.kstream"><code>Transformers</code></a>, |
| or <a href="kstream/ValueTransformer.html" title="interface in org.apache.kafka.streams.kstream"><code>ValueTransformer</code></a>; those have read-only access to all global stores by default. |
| <p> |
| The supplier should always generate a new instance each time <a href="processor/api/ProcessorSupplier.html#get()"><code>ProcessorSupplier.get()</code></a> gets called. Creating |
| a single <a href="processor/api/Processor.html" title="interface in org.apache.kafka.streams.processor.api"><code>Processor</code></a> object and returning the same object reference in <a href="processor/api/ProcessorSupplier.html#get()"><code>ProcessorSupplier.get()</code></a> would be |
| a violation of the supplier pattern and leads to runtime exceptions.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>storeBuilder</code> - user defined <a href="state/StoreBuilder.html" title="interface in org.apache.kafka.streams.state"><code>StoreBuilder</code></a>; can't be <code>null</code></dd> |
| <dd><code>topic</code> - the topic to source the data from</dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters; can't be <code>null</code></dd> |
| <dd><code>stateUpdateSupplier</code> - the instance of <a href="processor/ProcessorSupplier.html" title="interface in org.apache.kafka.streams.processor"><code>ProcessorSupplier</code></a></dd> |
| <dt>Returns:</dt> |
| <dd>itself</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="errors/TopologyException.html" title="class in org.apache.kafka.streams.errors">TopologyException</a></code> - if the processor of state is already registered</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addGlobalStore(org.apache.kafka.streams.state.StoreBuilder,java.lang.String,org.apache.kafka.streams.kstream.Consumed,org.apache.kafka.streams.processor.api.ProcessorSupplier)"> |
| <h3>addGlobalStore</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="type-parameters"><KIn,<wbr> |
| VIn></span> <span class="return-type"><a href="StreamsBuilder.html" title="class in org.apache.kafka.streams">StreamsBuilder</a></span> <span class="element-name">addGlobalStore</span><wbr><span class="parameters">(<a href="state/StoreBuilder.html" title="interface in org.apache.kafka.streams.state">StoreBuilder</a><?> storeBuilder, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> topic, |
| <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream">Consumed</a><KIn,<wbr>VIn> consumed, |
| <a href="processor/api/ProcessorSupplier.html" title="interface in org.apache.kafka.streams.processor.api">ProcessorSupplier</a><KIn,<wbr>VIn,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>,<wbr><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>> stateUpdateSupplier)</span></div> |
| <div class="block">Adds a global <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> to the topology. |
| The <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> sources its data from all partitions of the provided input topic. |
| There will be exactly one instance of this <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> per Kafka Streams instance. |
| <p> |
| A <code>SourceNode</code> with the provided sourceName will be added to consume the data arriving from the partitions |
| of the input topic. |
| <p> |
| The provided <a href="processor/api/ProcessorSupplier.html" title="interface in org.apache.kafka.streams.processor.api"><code>ProcessorSupplier</code></a>} will be used to create an |
| <a href="processor/api/Processor.html" title="interface in org.apache.kafka.streams.processor.api"><code>Processor</code></a> that will receive all records forwarded from the <code>SourceNode</code>. |
| The supplier should always generate a new instance. Creating a single <a href="processor/api/Processor.html" title="interface in org.apache.kafka.streams.processor.api"><code>Processor</code></a> object |
| and returning the same object reference in <a href="processor/api/ProcessorSupplier.html#get()"><code>ProcessorSupplier.get()</code></a> is a |
| violation of the supplier pattern and leads to runtime exceptions. |
| NOTE: you should not use the <a href="processor/api/Processor.html" title="interface in org.apache.kafka.streams.processor.api"><code>Processor</code></a> to insert transformed records into |
| the global state store. This store uses the source topic as changelog and during restore will insert records directly |
| from the source. |
| This <a href="processor/api/Processor.html" title="interface in org.apache.kafka.streams.processor.api"><code>Processor</code></a> should be used to keep the <a href="processor/StateStore.html" title="interface in org.apache.kafka.streams.processor"><code>StateStore</code></a> up-to-date. |
| The default <a href="processor/TimestampExtractor.html" title="interface in org.apache.kafka.streams.processor"><code>TimestampExtractor</code></a> as specified in the <a href="StreamsConfig.html" title="class in org.apache.kafka.streams"><code>config</code></a> is used. |
| <p> |
| It is not required to connect a global store to the <a href="processor/api/Processor.html" title="interface in org.apache.kafka.streams.processor.api"><code>Processors</code></a>, |
| <a href="kstream/Transformer.html" title="interface in org.apache.kafka.streams.kstream"><code>Transformers</code></a>, or <a href="kstream/ValueTransformer.html" title="interface in org.apache.kafka.streams.kstream"><code>ValueTransformer</code></a>; those have read-only access to all global stores by default.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>storeBuilder</code> - user defined <a href="state/StoreBuilder.html" title="interface in org.apache.kafka.streams.state"><code>StoreBuilder</code></a>; can't be <code>null</code></dd> |
| <dd><code>topic</code> - the topic to source the data from</dd> |
| <dd><code>consumed</code> - the instance of <a href="kstream/Consumed.html" title="class in org.apache.kafka.streams.kstream"><code>Consumed</code></a> used to define optional parameters; can't be <code>null</code></dd> |
| <dd><code>stateUpdateSupplier</code> - the instance of <a href="processor/api/ProcessorSupplier.html" title="interface in org.apache.kafka.streams.processor.api"><code>ProcessorSupplier</code></a></dd> |
| <dt>Returns:</dt> |
| <dd>itself</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="errors/TopologyException.html" title="class in org.apache.kafka.streams.errors">TopologyException</a></code> - if the processor of state is already registered</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="build()"> |
| <h3>build</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Topology.html" title="class in org.apache.kafka.streams">Topology</a></span> <span class="element-name">build</span>()</div> |
| <div class="block">Returns the <a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a> that represents the specified processing logic. |
| Note that using this method means no optimizations are performed.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>the <a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a> that represents the specified processing logic</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="build(java.util.Properties)"> |
| <h3>build</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="Topology.html" title="class in org.apache.kafka.streams">Topology</a></span> <span class="element-name">build</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.html" title="class or interface in java.util" class="external-link">Properties</a> props)</span></div> |
| <div class="block">Returns the <a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a> that represents the specified processing logic and accepts |
| a <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.html" title="class or interface in java.util" class="external-link"><code>Properties</code></a> instance used to indicate whether to optimize topology or not.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>props</code> - the <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Properties.html" title="class or interface in java.util" class="external-link"><code>Properties</code></a> used for building possibly optimized topology</dd> |
| <dt>Returns:</dt> |
| <dd>the <a href="Topology.html" title="class in org.apache.kafka.streams"><code>Topology</code></a> that represents the specified processing logic</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |