1
1
# Kafka Streams Examples
2
2
3
+ > [ !NOTE]
4
+ > This repo is replaced with [ Confluent Tutorials for Apache Kafka] ( https://github.com/confluentinc/tutorials ) .
5
+ We still "keep the lights on", but we don't improve existing examples any longer, nor do we add new example.
6
+
3
7
This project contains code examples that demonstrate how to implement real-time applications and event-driven
4
8
microservices using the Streams API of [ Apache Kafka] ( http://kafka.apache.org/ ) aka Kafka Streams.
5
9
@@ -254,17 +258,14 @@ If you are using Eclipse, you can also right-click on `pom.xml` file and choose
254
258
255
259
<a name="requirements-java"/>
256
260
257
- ## Java 8+
258
-
259
- Some code examples require Java 8+, primarily because of the usage of
260
- [lambda expressions](https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html).
261
+ ## Java 17+
261
262
262
263
IntelliJ IDEA users:
263
264
264
265
* Open _File > Project structure_
265
266
* Select "Project" on the left.
266
- * Set "Project SDK" to Java 1.8 .
267
- * Set "Project language level" to "8 - Lambdas, type annotations, etc. "
267
+ * Set "Project SDK" to Java 17 .
268
+ * Set "Project language level" to "17 - Sealed types, always-strict floating-point semantics "
268
269
269
270
270
271
<a name="requirements-scala"/>
@@ -274,11 +275,7 @@ IntelliJ IDEA users:
274
275
> Scala is required only for the Scala examples in this repository. If you are a Java developer you can safely ignore
275
276
> this section.
276
277
277
- If you want to experiment with the Scala examples in this repository, you need a version of Scala that supports Java 8
278
- and SAM / Java lambda (e.g. Scala 2.11 with `-Xexperimental` compiler flag, or 2.12).
279
-
280
- If you are compiling with Java 9+, you' ll need to have Scala version 2.12+ to be compatible with the Java version.
281
-
278
+ If you want to experiment with the Scala examples in this repository, you need a version of Scala that supports Java 17.
282
279
283
280
<a name="packaging-and-running"/>
284
281
@@ -300,10 +297,13 @@ In a nutshell:
300
297
```shell
301
298
# Ensure you have downloaded and installed Confluent Platform as per the Quickstart instructions above.
302
299
303
- # Start ZooKeeper
304
- $ ./ bin/zookeeper-server-start ./etc/kafka/zookeeper.properties
300
+ #Generate a Cluster UUID
301
+ $ KAFKA_CLUSTER_ID="$( bin/kafka-storage.sh random-uuid)"
305
302
306
- # In a separate terminal, start Kafka broker
303
+ #Format Log Directories
304
+ $ bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/kraft/reconfig-server.properties
305
+
306
+ # Start the Kafka broker
307
307
$ ./bin/kafka-server-start ./etc/kafka/server.properties
308
308
309
309
# In a separate terminal, start Confluent Schema Registry
@@ -378,17 +378,15 @@ $ mvn package # Packages the application examples into a standalone jar
378
378
379
379
| Branch (this repo) | Confluent Platform | Apache Kafka |
380
380
| ----------------------------------------| --------------------| -------------------|
381
- | [5.4.x](../../../tree/5.4.x/)\* | 5.4.0-SNAPSHOT | 2.4.0-SNAPSHOT |
382
- | [5.3.0-post](../../../tree/5.3.0-post/) | 5.3.0 | 2.3.0 |
383
- | [5.2.2-post](../../../tree/5.2.2-post/) | 5.2.2 | 2.2.1 |
384
- | [5.2.1-post](../../../tree/5.2.1-post/) | 5.2.1 | 2.2.1 |
385
- | [5.1.0-post](../../../tree/5.1.0-post/) | 5.1.0 | 2.1.0 |
386
- | [5.0.0-post](../../../tree/5.0.0-post/) | 5.0.0 | 2.0.0 |
387
- | [4.1.0-post](../../../tree/4.1.0-post/) | 4.1.0 | 1.1.0 |
388
- | [4.0.0-post](../../../tree/4.4.0-post/) | 4.0.0 | 1.0.0 |
389
- | [3.3.0-post](../../../tree/3.3.0-post/) | 3.3.0 | 0.11.0 |
390
-
391
- \*You must manually build the `2.3` version of Apache Kafka and the `5.3.x` version of Confluent Platform. See instructions above.
381
+ | [ master] ( ../../../tree/master/ ) \* | 8.0.0-SNAPSHOT | 4.0.0-SNAPSHOT |
382
+ | [ 7.9.x] ( ../../../tree/7.9.x/ ) | 7.9.0-SNAPSHOT | 3.9.0 |
383
+ | [ 7.8.0-post] ( ../../../tree/7.8.0-post/ ) | 7.8.0 | 3.8.0 |
384
+ | ... | | |
385
+ | [ 7.1.0-post] ( ../../../tree/7.1.0-post/ ) | 7.1.0 | 3.1.0 |
386
+
387
+ Older version prior to 7.1.0 are [ not supported any longer] ( https://docs.confluent.io/platform/current/installation/versions-interoperability.html ) .
388
+
389
+ \* You must manually build the ` 4.0 ` version of Apache Kafka and the ` 8.0.0 ` version of Confluent Platform. See instructions above.
392
390
393
391
The ` master ` branch of this repository represents active development, and may require additional steps on your side to
394
392
make it compile. Check this README as well as [ pom.xml] ( pom.xml ) for any such information.
0 commit comments