Why not Kafka 0.11 or 1.0

  • homebrew kafka version using 0.11 and could not launch on my computer, and it is hard to know detail why homebrew/kafka failed. (issue)
  • Transactional Coordinator still not support by sarama golang client (golang) (issue)

Install Kafka 0.8 manually in 2017/11

sudo su - 
cd /tmp 
wget https://archive.apache.org/dist/kafka/0.8.2.2/kafka_2.9.1-0.8.2.2.tgz
tar -zxvf kafka_2.9.1-0.8.2.2.tgz -C /usr/local/
cd /usr/local/kafka_2.9.1-0.8.2.2

sbt update
sbt package

cd /usr/local
ln -s kafka_2.9.1-0.8.2.2 kafka

echo "" >> ~/.bash_profile
echo "" >> ~/.bash_profile
echo "# KAFKA" >> ~/.bash_profile
echo "export KAFKA_HOME=/usr/local/kafka" >> ~/.bash_profile
source ~/.bash_profile

echo "export KAFKA=$KAFKA_HOME/bin" >> ~/.bash_profile
echo "export KAFKA_CONFIG=$KAFKA_HOME/config" >> ~/.bash_profile
source ~/.bash_profile

$KAFKA/zookeeper-server-start.sh $KAFKA_CONFIG/zookeeper.properties
$KAFKA/kafka-server-start.sh $KAFKA_CONFIG/server.properties

How to verify your installation?

(in your kafka path)

Create topic

> $KAFKA/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test`

Verify it

> $KAFKA/in/kafka-topics.sh --list --zookeeper localhost:2181

test

Or your can use golang client to verify it:

Troubleshooting

Reference:


Evan

Attitude is everything