kafka/examples
Lee Dongjin b2aec9496d
MINOR: Fix javadoc at org.apache.kafka.clients.producer.KafkaProducer.InterceptorCallback#onCompletion (#7337)
Reviewers: Guozhang Wang <wangguoz@gmail.com>
2020-02-20 10:56:11 -08:00
..
bin KAFKA-9447: Add new customized EOS model example (#8031) 2020-02-05 16:51:07 -08:00
src/main/java/kafka/examples MINOR: Fix javadoc at org.apache.kafka.clients.producer.KafkaProducer.InterceptorCallback#onCompletion (#7337) 2020-02-20 10:56:11 -08:00
README MINOR: Improve EOS example exception handling (#8052) 2020-02-20 09:59:09 -08:00

README

This directory contains examples of client code that uses kafka.

To run the demo: 

   1. Start Zookeeper and the Kafka server
   2. For simple consumer demo, `run bin/java-simple-consumer-demo.sh`
   3. For unlimited sync-producer-consumer run, `run bin/java-producer-consumer-demo.sh sync`
   4. For unlimited async-producer-consumer run, `run bin/java-producer-consumer-demo.sh`
   5. 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.
   6. Some notes for exactly once demo:
      6.1. The Kafka server has to be on broker version 2.5 or higher.
      6.2. You could also use Intellij to run the example directly by configuring parameters as "Program arguments"