Mirror of Apache Kafka
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
liuzhuang2017 109b74c590
MINOR: Update the README file in examples. (#12272)
2 years ago
..
bin KAFKA-9922: Update demo instructions in examples README (#8559) 5 years ago
src/main/java/kafka/examples MINOR: Update the README file in examples. (#12272) 2 years ago
README MINOR: Update the README file in examples. (#12272) 2 years ago

README

This directory contains examples of client code that uses kafka.

To run the demo:

1. In Zookeeper mode, Start Zookeeper and the Kafka server. In KRaft mode, start the Kafka server.
2. For unlimited sync-producer-consumer run, `run bin/java-producer-consumer-demo.sh sync`
3. For unlimited async-producer-consumer run, `run bin/java-producer-consumer-demo.sh`
4. For exactly once demo run, `run bin/exactly-once-demo.sh 6 3 50000`,
this means we are starting 3 EOS instances with 6 topic partitions and 50000 pre-populated records.
5. Some notes for exactly once demo:
5.1. The Kafka server has to be on broker version 2.5 or higher.
5.2. You could also use IntelliJ IDEA to run the example directly by configuring parameters as "Program arguments"