{"id":21409674,"url":"https://github.com/edgar-code-repository/running-kafka","last_synced_at":"2026-01-03T13:12:24.395Z","repository":{"id":150026291,"uuid":"484599670","full_name":"edgar-code-repository/running-kafka","owner":"edgar-code-repository","description":"Running Apache Kafka 2.8.0, creating topics and producing / consuming messages using the command line tools.","archived":false,"fork":false,"pushed_at":"2022-04-23T23:36:22.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-23T04:29:30.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edgar-code-repository.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-04-22T23:37:35.000Z","updated_at":"2022-04-22T23:43:19.000Z","dependencies_parsed_at":"2023-04-12T20:24:35.339Z","dependency_job_id":null,"html_url":"https://github.com/edgar-code-repository/running-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/edgar-code-repository%2Frunning-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgar-code-repository%2Frunning-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgar-code-repository%2Frunning-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgar-code-repository%2Frunning-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edgar-code-repository","download_url":"https://codeload.github.com/edgar-code-repository/running-kafka/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910454,"owners_count":20367537,"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-22T17:28:03.158Z","updated_at":"2026-01-03T13:12:24.361Z","avatar_url":"https://github.com/edgar-code-repository.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"RUNNNING APACHE KAFKA\n---------------------------------------------------------------------\n\n**1.- Download Apache Kafka**\n\nVersion 2.8.0 of Apache Kafka can be downloaded from this link:\n\nhttps://archive.apache.org/dist/kafka/2.8.0/kafka_2.12-2.8.0.tgz\n\n\nUseful note: this is the command to kill a process that runs in a given port\n(in Ubuntu).\n\n```\n\nsudo kill -9 `sudo lsof -t -i:9001`\n\n```\n\n---------------------------------------------------------------------\n\n**2.- Execute Zookeeper**\n\nOnce the previous file is downloaded and extracted, we have to navigate \nto the bin directory and execute this command to run Zookeeper:\n\n```\n\n./zookeeper-server-start.sh ../config/zookeeper.properties\n\n```\n\nZookeeper runs in port 2181:\n\n```\n\nINFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)\n\n```\n\n---------------------------------------------------------------------\n\n**3.- Configure Kafka Broker**\n\nThen, we have go to the config directory where we have to add \nthese properties to the file server.properties:\n\n```\n\nlisteners=PLAINTEXT://localhost:9901\nauto.create.topics.enable=false\n\n```\n\n---------------------------------------------------------------------\n\n**4.- Run Kafka Broker**\n\nOnce again, we go to the bin directory, \nwhere we can run the Kafka Broker with this command:\n\n```\n\n./kafka-server-start.sh ../config/server.properties\n\n```\n\n---------------------------------------------------------------------\n\n**5.- Create a topic**\n\nAlways inside the bin directory, we create a topic \ncalled topic-example using this command:\n\n```\n./kafka-topics.sh --create --topic topic-example -zookeeper localhost:2181 --partitions 2 --replication-factor 1\n\n```\n---------------------------------------------------------------------\n\n**6.- Producing messages**\n\n```\n./kafka-console-producer.sh --broker-list localhost:9901 --topic topic-example\n\n```\n---------------------------------------------------------------------\n\n**7.- Consuming messages**\n\n```\n./kafka-console-consumer.sh --bootstrap-server localhost:9901 --topic topic-example\n\n./kafka-console-consumer.sh --bootstrap-server localhost:9901 --topic topic-example --from-beginning\n\n```\n---------------------------------------------------------------------\n\n**8.- Listing topics**\n\nCommand to list all the topics available:\n\n```\n./kafka-topics.sh --zookeeper localhost:2181 --list\n\n```\n\n---------------------------------------------------------------------","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgar-code-repository%2Frunning-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgar-code-repository%2Frunning-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgar-code-repository%2Frunning-kafka/lists"}