{"id":15839771,"url":"https://github.com/pythonista7/go-kafka-consumer","last_synced_at":"2025-09-10T12:36:04.211Z","repository":{"id":65349679,"uuid":"528324987","full_name":"Pythonista7/go-kafka-consumer","owner":"Pythonista7","description":"Starter template for a simple kafka consumer written in golang. ","archived":false,"fork":false,"pushed_at":"2022-10-27T17:29:26.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T16:55:24.318Z","etag":null,"topics":["go","kafka-consumer","starter-template"],"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/Pythonista7.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}},"created_at":"2022-08-24T08:04:59.000Z","updated_at":"2022-08-24T08:14:20.000Z","dependencies_parsed_at":"2023-01-20T17:01:25.935Z","dependency_job_id":null,"html_url":"https://github.com/Pythonista7/go-kafka-consumer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pythonista7/go-kafka-consumer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pythonista7%2Fgo-kafka-consumer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pythonista7%2Fgo-kafka-consumer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pythonista7%2Fgo-kafka-consumer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pythonista7%2Fgo-kafka-consumer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pythonista7","download_url":"https://codeload.github.com/Pythonista7/go-kafka-consumer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pythonista7%2Fgo-kafka-consumer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266506151,"owners_count":23940019,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["go","kafka-consumer","starter-template"],"created_at":"2024-10-05T16:21:33.001Z","updated_at":"2025-07-22T13:33:32.746Z","avatar_url":"https://github.com/Pythonista7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Kafka Consumer in Go\n\nThis is a template repository for a simple Kafka consumer in Go. It uses the [confluent pkg](https://github.com/confluentinc/confluent-kafka-go).\n\n## Instructions\n\n1. Clone this repository into your `$GOPATH/src` directory.\n\n2. Make sure your imports are correct and run `go mod tidy` to update the `go.sum` file.\n\n3. Start up a local kafka instance using the below command. This docker compose file will automatically create a topic called `test-topic-1`.Kafka-REST is also included to make it easy to interact with the kafka instance vua HTTP.\n\n    ```bash\n    docker-compose up -d \n    ```\n\n    You can check that the topic was created by running the following command:\n\n    ```bash\n    curl --request GET --url http://localhost:38082/topics\n    ```\n\n4. Run `go run main.go` to start the consumer.\n\n    *Note: If you are using a different kafka instance, you will need to update the properties in the `config/config.go` file.*\n\n5. Send a message to the topic using the following command:\n\n    ```bash\n    curl --request POST \\\n    --url http://localhost:38082/topics/test-topic-1 \\\n    --header 'content-type: application/vnd.kafka.json.v2+json' \\\n    --data '{\n        \"records\": [\n            {\n                \"value\": {\n                    \"taskType\":\"taskType1\",\n                    \"data\":{\n                        \"id\":1,\n                        \"name\": \"John Doe\"\n                    }\n                }\n            }\n        ]\n    }'\n    ```\n\n    You should see the message printed to the console.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythonista7%2Fgo-kafka-consumer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythonista7%2Fgo-kafka-consumer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythonista7%2Fgo-kafka-consumer/lists"}