Step 1: Download the code
Step 2: Start the server
Step 3: Create a topic
Step 4: Send some messages
Step 5: Start a consumer
Step 6: Setting up a multi-broker cluster
分别配置如下
@H_301_74@接下来,发个消息试试
消息是发布到localhost:9092上的,而当连接到localhost:9093和localhost:9094上也能收到消息,由此可见,replication-factor=3的作用
参考 http://kafka.apache.org/quickstart
原文链接:/kafka/882808.html