Skip to content

Instantly share code, notes, and snippets.

@kokospapa8
Last active May 5, 2020 07:44
Show Gist options
  • Select an option

  • Save kokospapa8/582c8ab538b27aa0442f19ef1237b734 to your computer and use it in GitHub Desktop.

Select an option

Save kokospapa8/582c8ab538b27aa0442f19ef1237b734 to your computer and use it in GitHub Desktop.
kafka cheatsheet
Docker
- list
kafka-topics --list --bootstrap-server="PLAINTEXT://kafka0:9092"
- create
kafka-topics --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic test
-
https://kafka.apache.org/quickstart
# host machine
> zookeeper kafka-topics --list --zookeeper localhost:2181
@kokospapa8
Copy link
Copy Markdown
Author

zookeeper kafka-topics --list --zookeeper localhost:2181

@kokospapa8
Copy link
Copy Markdown
Author

kafka-console-consumer.sh --bootstrap-server localhost: --topic --from-beginning

@kokospapa8
Copy link
Copy Markdown
Author

kafka-topics --list --zookeeper localhost:2181

@kokospapa8
Copy link
Copy Markdown
Author

kafka-topics --zookeeper 127.0.0.1:2181 --delete --topic "someTopic"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment