Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 373
user3619015 Avatar asked Jul 22 '14 10:07

user3619015


2 Answers

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

like image 155
Edenhill Avatar answered Sep 18 '22 16:09

Edenhill


As a follow up on Edenhill's answer, you can try cppkafka, a high level C++11 wrapper for librdkafka. There's some examples in there for you to look at.

like image 42
mfontanini Avatar answered Sep 20 '22 16:09

mfontanini