Search code examples
c++apache-kafkaconsumer

Kafka Consumer in C++


I have been searching for C++ kafka consumer. I came across following which are for C++ kafka but there is no consumer.

https://github.com/adobe-research/libkafka (Only sample producer)

https://github.com/edenhill/librdkafka/tree/master/src-cpp

Does anyone have C++ kafka consumer based on the above work or any new way for C++ kafka consumer


Solution

  • librdkafka's examples/ directory contains a C++ consumer (and producer):

    High-level balanced KafkaConsumer: https://github.com/edenhill/librdkafka/blob/master/examples/rdkafka_complex_consumer_example.cpp

    Low-level legacy Consumer: https://github.com/edenhill/librdkafka/blob/master/examples/rdkafka_example.cpp#L395