Public | Automated Build

Last pushed: a year ago
Short Description
A basic Kafka setup.
Full Description


A basic Kafka+Jolokia setup with Docker, without any ENV mappings. Bring your own file!


Using Docker Compose:

% docker-compose up
% kafkacat -L -b localhost:9092
% echo "hello" | kafkacat -P -b localhost:9092 -t hello-logs
% kafkacat -C -b localhost:9092 -t hello-logs

To use your own file, run something like:

docker run --rm -v $PWD/ dylanmei/kafka

To override values, run the command with --override arguments:

docker run --rm dylanmei/kafka bin/ \
  config/ \
  --override \
  --override zookeeper.connect=example:2181


Use the Jolokia API endpoint to query for metrics. Example:

% curl -s http://localhost:8778/jolokia/search/java.lang:type=* | jq '.'
% curl -s http://localhost:8778/jolokia/read/java.lang:type=ClassLoading | jq '.'

J4PSH is another way to explore Jolokia. Example:

% docker run --rm -it \
  --network=dockerkafka_default \
  jolokia/jmx4perl j4psh --color=no http://kafka-broker:8778/jolokia
Docker Pull Command
Source Repository