Apache Kafka Install

Source: Internet
Author: User
Tags zookeeper

1. Modify each server config/server.properties

Broker.id: Only, fill in the numbers

Host.name: Fill in the server IP

zookeeper.connect=192.168.1.100:2181,192.168.1.101:2181,192.168.1.103:2181


2. Start

Start the Zookeeper service first

bin/zkserver.sh start

Perform Kafka services on each machine

Bin/kafka-server-start.sh config/server.properties


3. Create Topic

Bin/kafka-topics.sh-create-zookeeper localhost:2181-replication-factor 3-partitions 1-topic demo_1


4. View Topic

Bin/kafka-topics.sh-list-zookeeper localhost:2181


5. View more information

Bin/kafka-topics.sh-describe-zookeeper 192.168.1.100:2181


6. Send a message

Bin/kafka-console-producer.sh-broker-list 192.168.1.100:9092-topic Demo_1


7. Receiving Messages

Bin/kafka-console-consumer.sh-zookeeper 192.168.1.100:2181-topic demo_1-from-beginning


Apache Kafka Install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.