# kafka-practice **Repository Path**: quantumcs/kafka-practice ## Basic Information - **Project Name**: kafka-practice - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-11-26 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 环境 docker run -it -d --name kafka-server -p 9092:9092 -p 2181:2181 spotify/kafka ### 生产者 ### 客户端操作命令 [kafka客户端命令](https://blog.csdn.net/zo_184/article/details/52144673) ### 为topic增加partition ```sh bin/kafka-topics.sh --alter --topic test-topic001 --zookeeper localhost:2181 --partitions 6 ``` ### 测试生产,消费能力 ```sh cat consumer-2018-06-05.log | awk '{print substr($1, 0, 9)}' | sort |uniq -c cat producer-2018-06-05.log | awk '{print substr($1, 0, 9)}' |sort | uniq -c ```