Streams
Kafka Streams is a client library providing organizations with a particularly efficient framework for processing streaming data. It offers a streamlined method for creating applications and microservices that must process data in real-time to be effective.
Check the Kafka Clients - Avro Producer and Consumer section.
- kafka streams
- kafka streams examples
- more kafka streams examples here.
- project location: kafka-streams
⚠️ Run these commands inside the root folder.
Create an alias for kafka-streams
:
alias kafka-streams="$PWD/kafka-streams/build/install/kafka-streams/bin/kafka-streams "
To permanently add the alias to your shell (~/.bashrc
or ~/.zshrc
file):
echo "alias kafka-streams='$PWD/kafka-streams/build/install/kafka-streams/bin/kafka-streams '" >> ~/.zshrc
Install the app:
./gradlew kafka-streams:install
kafka-streams
Run streams:
kafka-streams streams
Print results:
kafka-cli kafka-console-consumer --from-beginning --group kafka-streams.consumer \
--topic kafka-streams.supplier_counts_by_country \
--bootstrap-server kafka1:9092 \
--property print.key=true \
--property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer