Skip to content

Commit c5ed908

Browse files
vvcepheiguozhangwang
authored andcommitted
KAFKA-7741: streams-scala - document dependency workaround (#6125)
Reviewers: Guozhang Wang <[email protected]>
1 parent e066a37 commit c5ed908

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3290,6 +3290,32 @@ <h4><a id="streams_concepts_globalktable" href="#streams_concepts_globalktable">
32903290
<pre class="brush: scala;">
32913291
libraryDependencies += "org.apache.kafka" %% "kafka-streams-scala" % "{{fullDotVersion}}"
32923292
</pre>
3293+
<p>
3294+
<strong>Notes</strong>:
3295+
<ul>
3296+
<li>
3297+
The bugfix version <code>2.0.1</code> fixed several important flaws in <code class="docutils literal"><span class="pre">kafka-streams-scala</span></code>.
3298+
It's strongly recommended to use the latest bugfix release in general and to avoid <code>kafka-streams-scala 2.0.0</code> specifically.
3299+
</li>
3300+
<li>
3301+
<p>
3302+
There is an upstream dependency that causes trouble in SBT builds. This problem is fixed in <code>2.0.2</code>, <code>2.1.1</code>, and <code>2.2.0</code>.
3303+
Please consider using one of those versions or higher.
3304+
</p>
3305+
<p>
3306+
If you must use an earlier version, you may add an explicit dependency on the problematic library as a workaround:
3307+
<dl>
3308+
<dt><code>2.0.0</code></dt>
3309+
<dd><pre class="brush: scala;">libraryDependencies += "javax.ws.rs" % "javax.ws.rs-api" % "2.1" artifacts(Artifact("javax.ws.rs-api", "jar", "jar"))</pre></dd>
3310+
<dt><code>2.0.1</code></dt>
3311+
<dd><pre class="brush: scala;">libraryDependencies += "javax.ws.rs" % "javax.ws.rs-api" % "2.1" artifacts(Artifact("javax.ws.rs-api", "jar", "jar"))</pre></dd>
3312+
<dt><code>2.1.0</code></dt>
3313+
<dd><pre class="brush: scala;">libraryDependencies += "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1" artifacts(Artifact("javax.ws.rs-api", "jar", "jar"))</pre></dd>
3314+
</dl>
3315+
</p>
3316+
</li>
3317+
</ul>
3318+
</p>
32933319
<div class="section" id="scala-dsl-sample-usage">
32943320
<span id="streams-developer-guide-dsl-sample-usage"></span><h3><a class="toc-backref" href="#id28">Sample Usage</a><a class="headerlink" href="#scala-dsl-sample-usage" title="Permalink to this headline"></a></h3>
32953321
<p>The library works by wrapping the original Java abstractions of Kafka Streams within a Scala wrapper object and then using implicit conversions between them. All the Scala abstractions are named identically as the corresponding Java abstraction, but they reside in a different package of the library e.g. the Scala class <code class="docutils literal"><span class="pre">org.apache.kafka.streams.scala.StreamsBuilder</span></code> is a wrapper around <code class="docutils literal"><span class="pre">org.apache.kafka.streams.StreamsBuilder</span></code>, <code class="docutils literal"><span class="pre">org.apache.kafka.streams.scala.kstream.KStream</span></code> is a wrapper around <code class="docutils literal"><span class="pre">org.apache.kafka.streams.kstream.KStream</span></code>, and so on.</p>

0 commit comments

Comments
 (0)