Registry / messaging / modern-cpp-kafka

modern-cpp-kafka

JSON →
library2024.07.03vcpkgunverified

A C++ API for Kafka clients (i.e. KafkaProducer, KafkaConsumer, AdminClient)

vcpkg install modern-cpp-kafka
INSTALL
IMPORT
SIG · MODERN-CPP-KAFKA
M
modern-cpp-kafka
messagingcppv2024.07.03
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

kafka/KafkaProducer.h
#include <kafka/KafkaProducer.h>

Send a message to Kafka topic

#include <kafka/KafkaProducer.h> #include <iostream> int main() { kafka::KafkaProducer producer(kafka::Properties{{"bootstrap.servers", "localhost:9092"}}); auto record = kafka::ProducerRecord("test-topic", kafka::NullKey, "Hello Kafka!"); auto delivery = producer.send(record); std::cout << "Message sent: " << delivery.error << std::endl; return 0; }
Debug
Known issues
gotchaRequires librdkafka as a dependency
fix
Ensure librdkafka is installed and linked (find_package(RdKafka) or similar)
affects: *
Upgrade
Version history
2024.07.03latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources

No resource links recorded.

modern-cpp-kafka — pip install modern-cpp-kafka · libregistry