1. Prerequisite
./kafka-topics.sh \
	--bootstrap-server 192.168.0.123:9092  \
	--topic topic-elf --create \
	--partitions 3 --replication-factor 12. Produce Msg
./kafka-console-producer.sh --bootstrap-server 192.168.0.123:9092 \
	--topic topic-elf
> produce pal
> the second msg
kafka-console-producer.sh --bootstrap-server localhost:90923. Note
- 
默认,消息使用null key发送; 
- 
具有所提供名称的主题应存在,若指定主题不存在, 
 则将使用默认分区数和复制因子,创建提供名称的新主题;
- 
这些由config/server.properties的broker-side设置: 
auto.create.topics.enable=true
num.partitions=1
default.replication.factor=1| Entry | Memo | 
|---|---|
| --compression-codec | 启用消息压缩,默认gzip,可选值:none,gzip,snappy,lz4,zstd | 
| --producer-property | 传入任何生产者属性,如:acks=all | 
| --request-required-acks | 直接设置ack的替代方法 |