Kafka 2019-06-28
1.启动zookeeper
bin/zookeeper-server-start.sh config/zookeeper.properties
2.启动kafka
bin/kafka-server-start.sh config/server.properties
3.创建topic
bin/kafka-topics.sh \
--create \
--zookeeper localhost:2181 \
--replication-factor 1 \
--partitions 1 \
--topic gang_gang_topic4.查看所有topic
bin/kafka-topics.sh \
--list \
--zookeeper localhost:21815.启动生产者
bin/kafka-console-producer.sh \
--broker-list localhost:9092 \
--topic gang_gang_topic6.启动消费者
bin/kafka-console-consumer.sh \
--zookeeper localhost:2181 \
--topic gang_gang_topic7.partition
bin/kafka-topics.sh \
--zookeeper localhost:2181 \
--alter \
--topic gang_gang_topic \
--partitions 38.test
bin/kafka-producer-perf-test.sh \
--producer.config config/producer-test.properties \
--topic gnus-test \
--throughput 2000000 \
--num-records 6000000 \
--payload-file message.txt
bin/kafka-producer-perf-test.sh
--producer.config config/producer-test2.properties \
--topic gnus-test \
--throughput 2000000 \
--num-records 6000000 \
--payload-file message.txt