36 lines
1.2 KiB
Markdown
Executable File
36 lines
1.2 KiB
Markdown
Executable File
Hello and welcome to a QMP playground
|
|
|
|
0. Put `127.0.0.1 core-kafka` in your hosts file. Trust me.
|
|
|
|
1. Start the local kafka stack
|
|
bash ./kafka-stack/start.sh
|
|
1
|
|
|
|
2. Produce/Consume with Go
|
|
go run ./golang-producer-consumer/main.go
|
|
You're now producing/consuming 1 message per second to the topic "my-topic-1" in group "gogroup". See the program output for controls and options.
|
|
|
|
3. Produce/Consume with Java
|
|
cd java-producer-consumer ; bash ./build.sh ; bash ./one_consumer.sh
|
|
cd java-producer-consumer ; bash ./build.sh ; bash ./one_producer.sh
|
|
You're now either producing or consuming 1 message per second to the "my-topic-1" topic and "javagroup" group. Ctrl-C will escape. I don't get paid enough to know Java too.
|
|
|
|
4. View Stats
|
|
http://localhost:9000/addCluster
|
|
Name: local
|
|
Cluster Zookeeper Hosts: core-zookeeper:2181/qmp/local
|
|
Enable JMX Polling: YES
|
|
Poll consumer information: YES
|
|
[SAVE]
|
|
http://localhost:9000/clusters/local/topics/my-topic-1
|
|
|
|
5. bash ./kafka-stack/start.sh
|
|
2
|
|
|
|
BONUS
|
|
To run your own programs with this kafka-stack, do
|
|
. ./kafka-stack/start.sh
|
|
and choose
|
|
3
|
|
Your shell now has the environment variables it needs to use the Go qmp client with this stack.
|