{"id":19258389,"url":"https://github.com/maurodelazeri/kafka-cpp","last_synced_at":"2025-10-19T19:29:44.414Z","repository":{"id":150738666,"uuid":"185056327","full_name":"maurodelazeri/kafka-cpp","owner":"maurodelazeri","description":"C++ client for Kafka leveraging librdkafka https://github.com/edenhill/librdkafka","archived":false,"fork":false,"pushed_at":"2019-09-13T21:43:04.000Z","size":11731,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T09:19:48.438Z","etag":null,"topics":["cpp","kafka","librdkafka","producer-consumer"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/maurodelazeri.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":"2019-05-05T16:32:56.000Z","updated_at":"2019-12-10T01:37:53.000Z","dependencies_parsed_at":"2023-05-01T14:17:10.644Z","dependency_job_id":null,"html_url":"https://github.com/maurodelazeri/kafka-cpp","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/maurodelazeri%2Fkafka-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2Fkafka-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2Fkafka-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2Fkafka-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maurodelazeri","download_url":"https://codeload.github.com/maurodelazeri/kafka-cpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240356190,"owners_count":19788512,"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":["cpp","kafka","librdkafka","producer-consumer"],"created_at":"2024-11-09T19:13:14.413Z","updated_at":"2025-10-19T19:29:44.361Z","avatar_url":"https://github.com/maurodelazeri.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Kafka CPP\n\nThis repo contains two wrappers, one for produce `kafka_p.cc  kafka_p.h` and other to consume `kafka_c.cc  kafka_c.h ` from kafka\n\nSimple example of a producer:\n\n\n```c++\n#include \u003cstring\u003e\n#include \u003cunistd.h\u003e\n#include \"kafka_p.h\"\n\nint main(int argc, char *argv[]) {\n    bool running_ = true;\n    KafkaPCB cb;\n    std::string brokers = \"x.x.x.x:9092\";\n    std::string topic = \"test\";\n    std::string err_info;\n    std::cout \u003c\u003c \"######### \" \u003c\u003c brokers \u003c\u003c \"\\n\";\n\n    KafkaP kafka_p;\n    if (!kafka_p.init(brokers.c_str(), topic.c_str(), err_info, \"10000\", \u0026cb)) {\n        std::cout \u003c\u003c \"kafka producer init err, \" \u003c\u003c err_info \u003c\u003c \"\\n\";\n        exit(1);\n    }\n    auto test = \"Hello\";\n    while (running_) {\n        sleep(0.001);\n        if (!kafka_p.produce(test, 5, err_info)) {\n            std::cout \u003c\u003c \"XXX produce err, \" \u003c\u003c err_info \u003c\u003c \"\\n\";\n        } else {\n            //std::cout \u003c\u003c \"produce success\\n\";\n        }\n    }\n    return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurodelazeri%2Fkafka-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaurodelazeri%2Fkafka-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurodelazeri%2Fkafka-cpp/lists"}