Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Create
- Note:
- ```bash
- bin/kafka-topics.sh --zookeeper 127.0.0.1:8081,127.0.0.1:8082,127.0.0.1:8083 --create --topic test2 --partitions 6 --replication-factor 1
- ```
- ```bash
- bin/kafka-topics.sh --zookeeper 127.0.0.1:8081 --create --topic test-rep-one --partitions 6 --replication-factor 1
- ```
- ```bash
- bin/kafka-topics.sh --zookeeper 127.0.0.1:8081 --create --topic test-rep-two --partitions 6 --replication-factor 3
- ```
- ### List
- ```bash
- bin/kafka-topics.sh --list --zookeeper 127.0.0.1:8081
- ```
- ### Delete
- ```bash
- bin/kafka-topics.sh --zookeeper 127.0.0.1:8081 --delete --topic test-rep-one
- ```
- ### In broker
- ```bash
- bin/kafka-topics.sh --describe --zookeeper 127.0.0.1:8081 --topic test-rep-one
- ```
- ```bash
- bin/kafka-topics.sh --describe --zookeeper 127.0.0.1:8081 --topic test-rep-two
- ```
- ### Single thread, no replication
- ```
- KAFKA_HEAP_OPTS="-Xmx6G" bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-one --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=127.0.0.1:9094,127.0.0.1:9095,127.0.0.1:9096 buffer.memory=67108864 batch.size=8196
- ```
- ### Single-thread, async 3x replication
- ```
- KAFKA_HEAP_OPTS="-Xmx6G" bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-two --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=127.0.0.1:9094 acks=1 buffer.memory=67108864 batch.size=8196
- ```
- ### Single-thread, sync 3x replication
- ```
- KAFKA_HEAP_OPTS="-Xmx6G" bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-two --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=127.0.0.1:9094 acks=-1 buffer.memory=67108864 batch.size=8196
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement