{"id":27222268,"url":"https://github.com/up2code/demo-kafka","last_synced_at":"2026-04-28T08:05:33.378Z","repository":{"id":101256479,"uuid":"411237650","full_name":"up2code/demo-kafka","owner":"up2code","description":"Demostrate basic usage of Kafka in Spring boot","archived":false,"fork":false,"pushed_at":"2021-10-19T04:36:26.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T09:07:35.789Z","etag":null,"topics":["java","kafka","kafka-consumer","kafka-producer","spring-boot"],"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/up2code.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":"2021-09-28T10:35:07.000Z","updated_at":"2021-10-19T04:36:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"b53bc822-3ee7-49bd-953a-023dbc36888e","html_url":"https://github.com/up2code/demo-kafka","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/up2code/demo-kafka","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2code%2Fdemo-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2code%2Fdemo-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2code%2Fdemo-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2code%2Fdemo-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/up2code","download_url":"https://codeload.github.com/up2code/demo-kafka/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/up2code%2Fdemo-kafka/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32371714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["java","kafka","kafka-consumer","kafka-producer","spring-boot"],"created_at":"2025-04-10T08:58:07.085Z","updated_at":"2026-04-28T08:05:33.366Z","avatar_url":"https://github.com/up2code.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Demo Basic Apache Kafka with Spring Boot\n\n## demo-kafka-producer\n\nProvide simple APIs for demonstrate how spring boot produce messages to Kafka\n\n```\n[POST] /publish\n[POST] /publish/random\n```\n\nSee also in `demo-kafka-producer`\n\n## demo-kafka-consumer\n\nFor demonstrate how app consume message from Kafka in Spring boot.\n\nSimply start with mvn command or build as jar and run as multiple consumers.\n\nSee also in `demo-kafka-consumer`\n\n## Startup Kafka in Local\n\n```\n$ docker-compose up -d zookeeper broker\n```\n\n#### Create a topic\n```\n$ docker exec broker \\\nkafka-topics --bootstrap-server broker:9092 \\\n             --create \\\n             --partitions 3 \\\n             --topic test-topic\n```\n\n#### List topics\n```\n$ docker exec broker kafka-topics --list --zookeeper zookeeper:2181\n```\n\n#### Write messages to the topic\n```\n$ docker exec --interactive --tty broker \\\nkafka-console-producer --bootstrap-server broker:9092 \\\n                       --topic test-topic\n```\n\n#### Read messages from the topic\n```\n$ docker exec --interactive --tty broker \\\nkafka-console-consumer --bootstrap-server broker:9092 \\\n                       --topic test-topic \\\n                       --from-beginning\n```\n\n#### Kafka with UI\n\nCheck [OffsetExplorer](https://www.kafkatool.com/download.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup2code%2Fdemo-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fup2code%2Fdemo-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fup2code%2Fdemo-kafka/lists"}