librdkafka
library.- Stack.
- GHC.
- Docker.
- Kafka.
$ brew install librdkafka
$ sudo apt-get install librdkafka-dev
$ docker-compose up -d
$ ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'
$ hostname -i | awk '{print $1}'
$ docker exec -it my_haskell_kafka bash /opt/kafka/bin/kafka-topics.sh --list --zookeeper {IP}:2181
$ docker exec -it my_haskell_kafka bash /opt/kafka/bin/kafka-console-consumer.sh -bootstrap-server {IP}:9092 --topic haskell.t --from-beginning
$ stack build
$ stack exec haskell-publisher-kafka-exe
$ stack build
$ stack exec haskell-consumer-kafka-exe
$ ./{KAFKA_PATH}/bin/zookeeper-server-start.sh ./config/zookeeper.properties
$ ./{KAFKA_PATH}/bin/kafka-server-start.sh ./config/server.properties
$ ./{KAFKA_PATH}/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic haskell.t
$ ./{KAFKA_PATH}/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 3 --topic haskell.t
$ ./{KAFKA_PATH}/bin/kafka-topics.sh --list --zookeeper localhost:2181
$ ./{KAFKA_PATH}/bin/kafka-console-consumer.sh -bootstrap-server localhost:9092 --topic haskell.t --from-beginning
$ stack build
$ stack exec haskell-publisher-kafka-exe
$ stack build
$ stack exec haskell-consumer-kafka-exe