{"id":20796700,"url":"https://github.com/gotocva/apache-kafka","last_synced_at":"2025-03-12T01:44:31.210Z","repository":{"id":114646736,"uuid":"235961587","full_name":"gotocva/apache-kafka","owner":"gotocva","description":"Let's build a pub/sub program using Kafka and Node.js, Kafka is a enterprise level tool for sending messages across the Microservices.","archived":false,"fork":false,"pushed_at":"2020-01-24T10:55:44.000Z","size":14,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T11:29:14.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gotocva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-24T08:00:23.000Z","updated_at":"2020-01-24T10:55:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"b183aaa4-4825-42c6-b6a6-db3e7bf8ba68","html_url":"https://github.com/gotocva/apache-kafka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fapache-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fapache-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fapache-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotocva%2Fapache-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotocva","download_url":"https://codeload.github.com/gotocva/apache-kafka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243141256,"owners_count":20242817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T16:28:40.855Z","updated_at":"2025-03-12T01:44:31.179Z","avatar_url":"https://github.com/gotocva.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nPrerequisites\n\nKafka is written in Java, so it requires a JVM;\nOpenJDK 8 must be installed on your server.\n\nTo install OpenJDK 8, execute the following command:\n\n```\n$ sudo apt install openjdk-8-jdk\n```\n\nVerify that this is installed with\n```\n$ java -version\n```\n\nInstall apache kafka \n\n```\n$ sudo useradd kafka -m\n```\n\n```\n$ sudo passwd kafka\n```\nIt asks for new password for user kafka\n\n```\n$ sudo adduser kafka sudo\n```\n\n```\n$ su -l kafka\n```\n\nTo start, create a directory in /home/kafka called Downloads to store your downloads:\n\n```\n$ mkdir ~/Downloads\n```\n\n```\n$ curl \"https://www.apache.org/dist/kafka/2.1.1/kafka_2.11-2.1.1.tgz\" -o ~/Downloads/kafka.tgz\n```\n\n```\n$ mkdir ~/kafka \u0026\u0026 cd ~/kafka\n```\n\n```\n$ tar -xvzf ~/Downloads/kafka.tgz --strip 1\n```\n\nConfiguring kafka server\n\n```\n$ nano ~/kafka/config/server.properties\n```\n\nLet’s add a setting that will allow us to delete Kafka topics. Add the following to the bottom of the file:\n~/kafka/config/server.properties\n\ndelete.topic.enable = true\n\n```\n$ sudo nano /etc/systemd/system/zookeeper.service\n```\n\n[Unit]\nRequires=network.target remote-fs.target\nAfter=network.target remote-fs.target\n\n[Service]\nType=simple\nUser=kafka\nExecStart=/home/kafka/kafka/bin/zookeeper-server-start.sh /home/kafka/kafka/config/zookeeper.properties\nExecStop=/home/kafka/kafka/bin/zookeeper-server-stop.sh\nRestart=on-abnormal\n\n[Install]\nWantedBy=multi-user.target\n\n```\n$ sudo nano /etc/systemd/system/kafka.service\n```\n\n```\n$ sudo systemctl start kafka\n```\n\nTo ensure that the server has started successfully, check the journal logs for the kafka unit:\n\n```\n$ sudo journalctl -u kafka\n```\n\nYou should see output similar to the following:\n\nOutput\nJul 17 18:38:59 kafka-ubuntu systemd[1]: Started kafka.service.\n\nYou now have a Kafka server listening on port 9092.\n\nWhile we have started the kafka service, if we were to reboot our server, it would not be started automatically. To enable kafka on server boot, run:\n\n```\n$ sudo systemctl enable kafka\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotocva%2Fapache-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotocva%2Fapache-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotocva%2Fapache-kafka/lists"}