
Apache Kafka is an open-source, distributed message broker based on Scala and Java. It's used as a publish-subscribe messaging system; when a producer publishes a message, it's broadcast, and subscribers can get notified and process the information. It can handle large volumes of real-time data and event streaming pipelines with higher throughput than popular message brokers like ActiveMQ and RabbitMQ. In addition, it's highly scalable and fault-tolerant.
Apache Kafka uses Apache Zookeeper to keep track of its cluster node's status, topics, partitions, and so on. Apache ZooKeeper is an open-source project built for centralized services. It provides configuration information, naming, synchronization and group services for large clusters in a distributed systems.
This article explains how to install Apache Kafka on Ubuntu 20.04 server.
Update system package list.
Install Java.
Verify the installation.
Download Apache Kafka source files. To find the latest version of this software, visit the official download website.
Create an installation directory /usr/local/kafka-server.
Extract the downloaded files.
Move the extracted files to the installation directory.
For Apache Kafka and Apache Zookeeper to run as daemons, create systemd files for both of them.
Creating systemd file for Apache Zookeeper.
Add the following lines of code to the file, save and close the file.
Creating systemd file for Apache Kafka.
Add the following lines of code to the file, save and close the file.
Reload the systemd daemons to apply the changes.
Start and enable the Apache Zookeeper service for startup on system boot.
Start and enable the Apache Kafka service for startup on system boot.
Verify the status of both Apache Zookeeper and Apache Kafka services.
CMAK is a graphical management tool for Apache Kafka clusters. It provides the user with various tools to avoid using the CLI interface.
Clone the CMAK repository from GitHub.
Edit the CMAK configuration file.
Change the value of cmak.zkhosts as follows.
Change to the CMAK directory.
Create a zip file used for deploying the application.
Change into CMAK/target/universal directory.
Install unzip package.
Extract the created zip file.
Change to the extracted directory.
Execute the CMAK binary to start the service.
Open your web browser and access the CMAK web interface using the URL http://ServerIP:9000. For example:
You have installed Apache Kafka and Apache Zookeeper on your server. You can now access the CMAK dashboard and add a Kafka cluster.
For more information on Apache Kafka, please see the official documentation.
0 Comments
Be the first to comment and share your perspective with the community.