{"id":20909937,"url":"https://github.com/escalopa/kafka-playground","last_synced_at":"2026-05-21T06:36:02.604Z","repository":{"id":181654659,"uuid":"665239721","full_name":"escalopa/kafka-playground","owner":"escalopa","description":"A kafka playground to learn it more in depth","archived":false,"fork":false,"pushed_at":"2024-11-23T20:19:52.000Z","size":29926,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T22:15:17.845Z","etag":null,"topics":["golang","kafka"],"latest_commit_sha":null,"homepage":"","language":"Go","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/escalopa.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":"2023-07-11T18:53:46.000Z","updated_at":"2024-11-23T20:19:56.000Z","dependencies_parsed_at":"2024-06-21T02:27:19.018Z","dependency_job_id":"eb0f2541-6ddb-477b-b9bc-a6254cadbf47","html_url":"https://github.com/escalopa/kafka-playground","commit_stats":null,"previous_names":["escalopa/kafka-playground"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/escalopa/kafka-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fkafka-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fkafka-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fkafka-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fkafka-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/escalopa","download_url":"https://codeload.github.com/escalopa/kafka-playground/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escalopa%2Fkafka-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28076836,"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","status":"online","status_checked_at":"2025-12-27T02:00:05.897Z","response_time":58,"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":["golang","kafka"],"created_at":"2024-11-18T14:13:17.522Z","updated_at":"2025-12-27T09:28:34.318Z","avatar_url":"https://github.com/escalopa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kafka-playground 💪\n\nThis is a simple kafka playground where you can run commands and experience how kafka works.\n\n## Run 🚀\n\nClone the repo.\n\n```shell\ngit clone https://github.com/escalopa/kafka-playground.git\n```\n\n### KRaft 🐼\n\nTo run the kafka cluster you have to use the following command.\n\n```shell\ndocker compose up -d\n```\n\n### Topic 📝\n\nIn the docker compose config, creating a new topic on usage is forbidden, so you have to create the topic in advance.\n\nTo create a topic you have to specify 2 fields.\n\n* `topic`: the topic name.\n* `part`: number of partitions in the topic.\n\nUse the make command to create a topic.\n\n```shell\nmake create-topic TOPIC=topic PART=3\n```\n\n### Produce ⏩\n\nTo run producer you have to specify 1 value.\n\n* `topic`: the topic name to which the producer will connect.\n* `freq`: the frequency of the message production in seconds. (default is 1s)\n\nIf you want to use `key` | `partition` values, change the values in source code 🙂. By default the message are spread using `round-robin`\n\nUse the make command to run a producer.\n\n```shell\nmake produce TOPIC=topic \n```\n\n### Consumer-Group ⏪\n\nConsumerGroup as the name suggest consumes from more than one  partions/topic at the same time\n\nIn a single group can participate up to `N` consumers where `N` is the total numebr of partition of all topics(You can use more than `N` but is useless since you will have consumers with no partitions to listen to)\n\nTo run a consumer-group you have to specify the following values\n\n* `group`: the name of the group\n* `assigner`: the strategy for spreading messages between consumers, must be one out of `sticky,roundrobin,range` otherwise the code panics\n* `topics`: topics names to consume from\n\nUse the following command to run consumer-group\n\n```shell\nmake consume GROUP=g0 ASSIGNER=\"sticky\" TOPICS=\"topic1,topic2,topic3\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescalopa%2Fkafka-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fescalopa%2Fkafka-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescalopa%2Fkafka-playground/lists"}