edenhill / kcat

Generic command line non-JVM Apache Kafka producer and consumer
Other
5.41k stars 484 forks source link

How to run a mock Kafka cluster? #409

Open zc2638 opened 1 year ago

zc2638 commented 1 year ago

I refer to the README, but cannot start a mock kafka cluster.

➜  ~ docker run --rm -it --network host edenhill/kcat:1.7.1 -X bootstrap.servers=localhost:9092 -M 3
Error: unknown argument
zc2638 commented 1 year ago

/cc @edenhill

michaelbrown-stateless commented 1 year ago

Also having issues with this. I don't see any documentation on the -M flag in the help screen.

ryan-yalo commented 1 year ago

Mock cluster is a feature that first appears in v1.80 but AFAIA the latest tagged version anywhere (including in this repo) is v1.7.x. Even if the mock cluster feature was available in a tagged release however, using it from a docker container would currently be impossible because running on localhost is hard-coded in the librdkafka source code so there wouldn't be any way to get it to listen on 0.0.0.0 to be accessible outside the container.