Using Docker:
Start all the Containers $ docker-compose up
Open another terminal
Shell into the container running Kafka:
$ docker exec -it starter_kafka0_1 /bin/sh
Create your first topic:
kafka-topics --create --zookeeper zookeeper:2181 --topic sean.test.topic --replication-factor 1 --partitions 10
Write a message to the topic:
{"sensorpayload":test}
Hit CTRL+C to exit console.
Create a consumer of your topic:
Watch for the message you sent earlier.
Open another terminal
Shell into the container running Kafka:
$ docker exec -it starter_kafka0_1 /bin/sh
Write another message to the topic
{"sensorpayload":test2}
Watch the consumer for the new message to appear.
Run the startup script
$ ./startup.sh
Create your first topic:
kafka-topics --create --zookeeper localhost:2181 --topic sean.test.topic --replication-factor 1 --partitions 10
{"sensorpayload":test} ^C
Hit CTRL+C to exit console.
Create a consumer of your test topic:
Watch for the message you sent earlier.
Open another terminal
Write another message to the topic:
{"sensorpayload":test2}
Watch the consumer terminal for the new message to appear