6. Configure it
$ kaf config use-cluster dale
Switched to cluster "dale".
$ kaf config select-cluster
Use the arrow keys to navigate: ↓ ↑ → ←
? Select cluster:
▸ dale
ed
tim
nic
↓ matt
8. Produce with it
$ echo "Hello World" | kaf produce DEMO
Sent record to partition 0 at offset 0.
9. Produce with it
$ echo "Hello World" | kaf produce DEMO
Sent record to partition 0 at offset 0.
$ echo -n "Bonjour le monde" | kaf produce DEMO
Sent record to partition 0 at offset 1.
10. Produce with it
$ echo "Hello World" | kaf produce DEMO
Sent record to partition 0 at offset 0.
$ echo -n "Bonjour le monde" | kaf produce DEMO
Sent record to partition 0 at offset 1.
$ cat README.md | kaf produce DEMO
Sent record to partition 0 at offset 2.
15. What else?
$ kaf topic create ANOTHER
Created topic ANOTHER.
$ kaf topic ls
NAME PARTITIONS REPLICAS
ANOTHER 1 1
DEMO 1 3
$ kaf topic delete ANOTHER
Deleted topic ANOTHER.
22. Produce with it
$ kafkacat -P -t DEMO
Hello World
Bonjour le monde
$ kafkacat -P -t DEMO README.md
23. Produce with it
$ kafkacat -P -t DEMO
Hello World
Bonjour le monde
$ kafkacat -P -t DEMO README.md
$ kafkacat -P -t DEMO -H mykey=myvalue README.md
25. Consume with it
$ kafkacat -C -t DEMO
Hello World
Bonjour le monde
% Reached end of topic DEMO [0] at offset 2
26. Consume with it
$ kafkacat -C -t DEMO -f
'NEXT MESSAGEn============nheaders:n%hnmessage:n%snn'
27. Consume with it
$ kafkacat -C -t DEMO -f
'NEXT MESSAGEn============nheaders:n%hnmessage:n%snn'
NEXT MESSAGE
============
headers:
message:
Hello World
NEXT MESSAGE
============
headers:
mykey=myvalue
message:
Bonjour le monde
28. What else?
$ kafkacat -L
Metadata for all topics (from broker -1:
sasl_ssl://9.30.249.220:31250/bootstrap):
3 brokers:
broker 0 at 9.30.249.220:31203 (controller)
broker 2 at 9.30.249.220:32599
broker 1 at 9.30.249.220:30797
1 topics:
topic "DEMO" with 1 partitions:
partition 0, leader 1, replicas: 1,2,0, isrs: 1,2,0