Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: remove ZK from code base #529

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ after_pipeline:
- name: SonarQube
commands:
- checkout
- sem-version java 11
- if [[ $SEMAPHORE_GIT_BRANCH =~ ^7\..* ]]; then sem-version java 8; else sem-version java 17; fi
- artifact pull workflow target-AMD
- artifact pull workflow target-ARM
- emit-sonarqube-data --run_only_sonar_scan
48 changes: 23 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Kafka Streams Examples

> [!NOTE]
> This repo is replaced with [Confluent Tutorials for Apache Kafka](https://github.com/confluentinc/tutorials).
We still "keep the lights on", but we don't improve existing examples any longer, nor do we add new example.

This project contains code examples that demonstrate how to implement real-time applications and event-driven
microservices using the Streams API of [Apache Kafka](http://kafka.apache.org/) aka Kafka Streams.

Expand Down Expand Up @@ -254,17 +258,14 @@ If you are using Eclipse, you can also right-click on `pom.xml` file and choose

<a name="requirements-java"/>

## Java 8+

Some code examples require Java 8+, primarily because of the usage of
[lambda expressions](https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html).
## Java 17+

IntelliJ IDEA users:

* Open _File > Project structure_
* Select "Project" on the left.
* Set "Project SDK" to Java 1.8.
* Set "Project language level" to "8 - Lambdas, type annotations, etc."
* Set "Project SDK" to Java 17.
* Set "Project language level" to "17 - Sealed types, always-strict floating-point semantics"


<a name="requirements-scala"/>
Expand All @@ -274,11 +275,7 @@ IntelliJ IDEA users:
> Scala is required only for the Scala examples in this repository. If you are a Java developer you can safely ignore
> this section.

If you want to experiment with the Scala examples in this repository, you need a version of Scala that supports Java 8
and SAM / Java lambda (e.g. Scala 2.11 with `-Xexperimental` compiler flag, or 2.12).

If you are compiling with Java 9+, you'll need to have Scala version 2.12+ to be compatible with the Java version.

If you want to experiment with the Scala examples in this repository, you need a version of Scala that supports Java 17.

<a name="packaging-and-running"/>

Expand All @@ -300,10 +297,13 @@ In a nutshell:
```shell
# Ensure you have downloaded and installed Confluent Platform as per the Quickstart instructions above.

# Start ZooKeeper
$ ./bin/zookeeper-server-start ./etc/kafka/zookeeper.properties
#Generate a Cluster UUID
$ KAFKA_CLUSTER_ID="$(bin/kafka-storage.sh random-uuid)"

# In a separate terminal, start Kafka broker
#Format Log Directories
$ bin/kafka-storage.sh format --standalone -t $KAFKA_CLUSTER_ID -c config/kraft/reconfig-server.properties

# Start the Kafka broker
$ ./bin/kafka-server-start ./etc/kafka/server.properties

# In a separate terminal, start Confluent Schema Registry
Expand Down Expand Up @@ -378,17 +378,15 @@ $ mvn package # Packages the application examples into a standalone jar

| Branch (this repo) | Confluent Platform | Apache Kafka |
| ----------------------------------------|--------------------|-------------------|
| [5.4.x](../../../tree/5.4.x/)\* | 5.4.0-SNAPSHOT | 2.4.0-SNAPSHOT |
| [5.3.0-post](../../../tree/5.3.0-post/) | 5.3.0 | 2.3.0 |
| [5.2.2-post](../../../tree/5.2.2-post/) | 5.2.2 | 2.2.1 |
| [5.2.1-post](../../../tree/5.2.1-post/) | 5.2.1 | 2.2.1 |
| [5.1.0-post](../../../tree/5.1.0-post/) | 5.1.0 | 2.1.0 |
| [5.0.0-post](../../../tree/5.0.0-post/) | 5.0.0 | 2.0.0 |
| [4.1.0-post](../../../tree/4.1.0-post/) | 4.1.0 | 1.1.0 |
| [4.0.0-post](../../../tree/4.4.0-post/) | 4.0.0 | 1.0.0 |
| [3.3.0-post](../../../tree/3.3.0-post/) | 3.3.0 | 0.11.0 |

\*You must manually build the `2.3` version of Apache Kafka and the `5.3.x` version of Confluent Platform. See instructions above.
| [master](../../../tree/master/)\* | 8.0.0-SNAPSHOT | 4.0.0-SNAPSHOT |
| [7.9.x](../../../tree/7.9.x/) | 7.9.0-SNAPSHOT | 3.9.0 |
| [7.8.0-post](../../../tree/7.8.0-post/) | 7.8.0 | 3.8.0 |
| ... | | |
| [7.1.0-post](../../../tree/7.1.0-post/) | 7.1.0 | 3.1.0 |

Older version prior to 7.1.0 are [not supported any longer](https://docs.confluent.io/platform/current/installation/versions-interoperability.html).

\*You must manually build the `4.0` version of Apache Kafka and the `8.0.0` version of Confluent Platform. See instructions above.

The `master` branch of this repository represents active development, and may require additional steps on your side to
make it compile. Check this README as well as [pom.xml](pom.xml) for any such information.
Expand Down
21 changes: 12 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<chill.version>0.9.5</chill.version>
<docker.skip-build>false</docker.skip-build>
<docker.skip-test>false</docker.skip-test>
<java.version>11</java.version>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<scalatest.version>3.1.2</scalatest.version>
<!-- The default is ubi8 -->
Expand Down Expand Up @@ -124,14 +124,6 @@
<!-- This version must be compatible with the Scala version of the Kafka dependency. -->
<version>${scala.version}</version>
</dependency>
<dependency>
<!-- This could be a test-only dependency, but we keep it a compile dependency so that
users are able to package the examples via `mvn package` and actually run the examples
against a Kafka cluster. -->
<groupId>com.101tec</groupId>
<artifactId>zkclient</artifactId>
<version>0.9</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-reload4j</artifactId>
Expand Down Expand Up @@ -181,6 +173,11 @@
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.1</version>
</dependency>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W/o this, I got some ClassNotFoundException error -- just Googled for the error and found to add this... 🤷

<!--
This dependency is included to demonstrate the use of
Confluent Monitoring Interceptors in conjunction with
Expand Down Expand Up @@ -241,6 +238,12 @@
<classifier>test</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-test-common</artifactId>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To pull in KafkaClusterTestKit.

<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-streams-test-utils</artifactId>
Expand Down
Loading