{"id":19258386,"url":"https://github.com/maurodelazeri/kafkaz","last_synced_at":"2026-06-23T10:31:36.845Z","repository":{"id":150738759,"uuid":"241751968","full_name":"maurodelazeri/KafkaZ","owner":"maurodelazeri","description":"High level C++ wrapper for librdkafka - https://github.com/edenhill/librdkafka","archived":false,"fork":false,"pushed_at":"2020-02-20T13:43:47.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T18:15:29.131Z","etag":null,"topics":["cpp","kafka","librdkafka"],"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":"2020-02-19T23:47:27.000Z","updated_at":"2023-03-14T03:45:01.000Z","dependencies_parsed_at":"2023-05-20T17:31:24.122Z","dependency_job_id":null,"html_url":"https://github.com/maurodelazeri/KafkaZ","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maurodelazeri/KafkaZ","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2FKafkaZ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2FKafkaZ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2FKafkaZ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2FKafkaZ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maurodelazeri","download_url":"https://codeload.github.com/maurodelazeri/KafkaZ/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maurodelazeri%2FKafkaZ/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34686725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"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":["cpp","kafka","librdkafka"],"created_at":"2024-11-09T19:13:14.345Z","updated_at":"2026-06-23T10:31:36.823Z","avatar_url":"https://github.com/maurodelazeri.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KafkaZ\nHigh level C++ wrapper for librdkafka - https://github.com/edenhill/librdkafka\n\n### Dependencies\n\n* https://github.com/edenhill/librdkafka\n* https://github.com/gabime/spdlog (this is not required, but im using for some logs)\n\n### Consumer example\n\n```c++\n#include \u003cunistd.h\u003e\n#include \u003ciostream\u003e\n#include \"src/KafkaZ/ConsumerFactory.h\"\n\nusing namespace std;\n\nint main(int argc, char **argv) {\n    std::string broker = \"x.x.x.x:9092\";\n    KafkaZ::BrokerSettings settings;\n    settings.Address = broker;\n    std::string topic = \"test\";\n\n    std::unique_ptr\u003cKafkaZ::ConsumerInterface\u003e consumer_ = KafkaZ::createConsumer(settings, broker);\n        consumer_-\u003eaddTopic(topic);\n        //consumer_-\u003eaddTopicAtTimestamp(topic,1582155192000ms); you can specify based on timestamp also\n        while (true) {\n            std::unique_ptr\u003cstd::pair\u003cKafkaZ::PollStatus, Msg\u003e\u003e KafkaMessage =\n                    consumer_-\u003epoll();\n            if (KafkaMessage-\u003efirst == KafkaZ::PollStatus::Message) {\n                cout \u003c\u003c KafkaMessage-\u003esecond.data() \u003c\u003c endl;\n            }\n    }\n    return 0;\n}\n```\n\n### Producer example\n\n```c++\n#include \u003cunistd.h\u003e\n#include \"src/KafkaZ/Producer.h\"\n#include \"src/KafkaZ/ProducerTopic.h\"\n\nusing namespace std;\n\nint main(int argc, char **argv) {\n    std::string broker = \"x.x.x.x:9092\";\n    KafkaZ::BrokerSettings settings;\n    settings.Address = broker;\n    std::string topic = \"test\";\n\n    auto producer = std::make_shared\u003cKafkaZ::Producer\u003e(settings);\n    KafkaZ::ProducerTopic pt(producer, topic);\n    while (true) {\n        pt.produce(\"got it \" + to_string(rand()));\n        sleep(1);\n    }\n    return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurodelazeri%2Fkafkaz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaurodelazeri%2Fkafkaz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaurodelazeri%2Fkafkaz/lists"}