{"id":26092894,"url":"https://github.com/jazzshu/springkafka","last_synced_at":"2026-05-05T15:39:29.729Z","repository":{"id":143113510,"uuid":"560087618","full_name":"jazzshu/SpringKafka","owner":"jazzshu","description":"This is a simple demo project to experiment with Kafka in a Spring backend running on Windows.","archived":false,"fork":false,"pushed_at":"2022-10-31T18:57:39.000Z","size":66,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T09:32:11.123Z","etag":null,"topics":["backend","kafka","spring-boot","windows"],"latest_commit_sha":null,"homepage":"","language":"Java","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/jazzshu.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-10-31T17:57:44.000Z","updated_at":"2022-11-05T16:33:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"19985fa6-6b0f-4b9c-bee1-239e401326b6","html_url":"https://github.com/jazzshu/SpringKafka","commit_stats":null,"previous_names":["jazzshu/springkafka"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FSpringKafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FSpringKafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FSpringKafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jazzshu%2FSpringKafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jazzshu","download_url":"https://codeload.github.com/jazzshu/SpringKafka/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242679511,"owners_count":20168163,"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":["backend","kafka","spring-boot","windows"],"created_at":"2025-03-09T11:10:21.109Z","updated_at":"2026-05-05T15:39:29.695Z","avatar_url":"https://github.com/jazzshu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring-Kafka-Demo\n\n### Installation\n\nTo install Apache Kafka on Windows, download the binary from [Kafka](https://kafka.apache.org/downloads) and extract it. Once you extracted the binaries, you need to change some configuration properties. Inside che *config* directory, open the **zookeper.properties** file and locate the dataDir properties and change it with your current Kafka path and add **zookeper-data** to the end of the path.\n\nAfter you have done that, you need to change the **server.properties** file as well, locate the *log.dirs* property, and change the path with your actual Kafka path and add *kafka-logs* to the end of the path.\n\nIn the **server.properties** file you also need to change the listener port and host: search for the *listeners* line and change it with\n```\nlisteners=PLAINTEXT://0.0.0.0:9092\n```\nas well as the listeners adviser with\n```\nadvertised.listeners=PLAINTEXT://localhost:9092\n```\n\n### How it works\n\nKafka is a distributed system consisting of servers and clients that communicate via a high-performance TCP network protocol.\nTo run Kafka you need first of all to start a ZooKeeper broker with the following command:\n```\n.\\bin\\windows\\zookeeper-server-start.bat .\\config\\zookeeper.properties\n```\nAfter that, you may start the kafka server with this command in another terminal:\n```\n.\\bin\\windows\\kafka-server-start.bat .\\config\\server.properties\n```\n\nThe application is able to send an event through an API in the MessageController class, where it takes as an input a Message object with a message property.\nOnce you make a request to the http://localhost:8080/api/v1/messages endpoint with a body structured like this:\n```json\n{\n  \"messages\": \"This is my message\"\n}\n```\nYou will be able to see the event being transmitted and receveid both in your console and, if you want, you can even see it on a terminal simply by runnning the following command:\n```\nbin/windows/kafka-console-consumer.bat --topic \u003cyourTopic\u003e --from-beginning --bootstrap-server localhost:9092\n```\nwhere \"yourTopic\" in this case is replaced by *dotjson*, as it is declared in the **KafkaTopicConfig** class.\n\n### Sources\n\n[Spring for Apache Kafka](https://docs.spring.io/spring-kafka/docs/current/reference/html/)\n\n[Amigos Code Video](https://www.youtube.com/watch?v=SqVfCyfCJqw\u0026t=683s\u0026ab_channel=Amigoscode)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazzshu%2Fspringkafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjazzshu%2Fspringkafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjazzshu%2Fspringkafka/lists"}