brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk14
brew cask install homebrew/cask-versions/adoptopenjdk8
This is weird. The brew cask formula depends on homebrew/cask-versions/adoptopenjdk8. But the running zookeeper version requires adoptopenjdk14
Then install kafka
brew install kafka
The above will install kafka and it's dependency zookeeper
You can start both of them by,
zookeeper-server-start /usr/local/etc/kafka/zookeeper.properties
kafka-server-start /usr/local/etc/kafka/server.properties
OR preferably you can start in the background by
brew services start zookeeper
brew services start kafka
You can ensure those services started by,
brew services list
If the services have not started, look at the logs at
tail -f /usr/local/var/log/kafka/kafka_output.log
There are bunch of options. One of them is Kafdrop. Download the latest release and you can run that locally with,
java --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -jar ~/Downloads/kafdrop-3.27.0.jar
And visit http://localhost:9000/
One more optional tool to play with kafka (publishing, subscribing, metadata, etc.) is Kafkacat. Install with
brew install kafkacat