Connect with Kafka brokers using Ballerina.

Kevin Ratnasekera
Jan 7, 2018 · 3 min read
kafka_2.12–1.0.0$ bin/zookeeper-server-start.sh config/zookeeper.properties
kafka_2.12–1.0.0$ bin/kafka-server-start.sh config/server.properties
kafka_2.12–1.0.0$ bin/kafka-topics.sh --create --topic test-topic --zookeeper localhost:2181 --replication-factor 1 --partitions 2
ballerina-0.95.6/bin$ ./ballerina run ../location/kafka-message-consumer-service-advanced.bal 
ballerina-0.95.6/bin$ ./ballerina run ../location/kafka-message-producer-advanced.bal 
Topic: test-topic Received Message: Hello World Advanced

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade