Skip to content
kafka word count demo
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

To run this demo:

  1. Build the project with mvn package, this will generate an word-count-jar with the streams app and all its dependencies.

  2. Create a kafka-word-count-input topic, if you had create this topic, ignore this step:

    bin/ --zookeeper localhost:2181 --create --topic kafka-word-count-input --partitions 1 --replication-factor 1

  3. Produce some text to the topic.

    bin/ --broker-list localhost:9092 --topic kafka-word-count-input

  4. Run the app:

    java -cp target/kafka-word-count-test-1.0-SNAPSHOT.jar com.godpan.WordCount

  5. Take a look at the results:

    bin/ --topic kafka-word-count-output --from-beginning --bootstrap-server localhost:9092 --property print.key=true

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.