An example using Kafka with ruby-kafka & racecar gems.
An example using Kafka with ruby-kafka
& racecar
gems.
docker-compose build
Run Docker
docker-compose up
Run Consumer within app
container
# docker-compose exec app bash
racecar --require consumer Consumer
Run Producer within app
container
# docker-compose exec app bash
ruby producer.rb
Consumer will prints Hello World
with current time. You can run Producer multiple times to send more messages.