Zoe — New Kafka client in town
Yet another command-line Kafka tool but with good features. If you are a fan of Command-line tools then definitely should explore it.
Zoe is a command-line interface open-sourced by Adventia. So, what I am posting about one more Kafka Tool while well know Kafkacat is out there for some time. There are some features in specific Filtering, Querying and managing environments as well ability to predefine expressions to filter or view data is where Zoe caught my attention. Also, the ability to view data in different formats like a table, JSON, and raw.
Install
There are several ways you can install zoe CLI.
Run this command to install using homebrew
brew install adevinta/homebrew-zoe/zoe
Verify installation using
zoe --help
Config
Initialize configuration
zoe config init
This will create a default configuration file in users home directory ~/.zoe/config/default.yml
Two ways to organize configuration for multiple environments.
- Having all different environment cluster information in default.yml
- Separate the YAML file for each environment configuration to keep it separate.
With the second approach you can organize your files as shown below:
~/.zoe/config
├── dev.yml
├── staging.yml
└── prod.yml
To reference specific cluster and Query topic data you can simply use -c local
and pass a reference to cluster name according to YAML file.
OR
You could also use - - env staging
attribute to reference your environment name
OR
Environment Variable export ZOE_ENV=pro
Output formats
Zoe supports multiple output formats to visualize data. At a time table format is very useful when troubleshooting data and using Query and Filter modes.
Use one of the formats with -o as shown below
-o raw|json|table
Topics, Consumer Groups, and Schema examples
Topics
List Topics
zoe -c local -o table topics list
Describe Topic
zoe -c local -o table topics describe "demo.topic"
Query specific data points from Message in particular Topic
zoe -o table -v --cluster local topics consume "demo.topic" --query '{id: itemID}'
Filter data by property in message
zoe -o table -v --cluster local topics consume "demo.topic" --filter "itemID == '5550a0be-cae9-4bfc-a1d9-1f9375fa6b42'"
Consumer Groups
List Consumer Groups
zoe -o table -v -c local groups list
View Offsets of Consumer Group
zoe -o table -v -c local groups offsets "DemoGroupId"
Describe Consumer Group
zoe -o table -v -c local groups describe "DemoGroupId"
View Members of Consumer Group
zoe -o table -v -c local groups members "DemoGroupId"
Schema
List Schema
zoe -c local schemas list
For some Advance usage check out Documentation here
Conclusion
I rate Zoe 3.5 over Kafkacat 4.5. Overall zoe shines for certain features over Kafkacat. However, since it is less than a couple of weeks into the first release some performance improvements overtime will be win while working with a large data set.