I'm using https://github.com/simplesteph/kafka-stack-docker-compose
this library for kafka compose on docker.
I'm using http://jdde.pretty-tools.com/en/examples/adviceexample.htm
this library for dde communication
Kafka Console Consumer code : kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning