mfontanini / cppkafka

Modern C++ Apache Kafka client library (wrapper for librdkafka)
BSD 2-Clause "Simplified" License
600 stars 206 forks source link

Modify the producer config trouble #264

Open wolfviking0 opened 4 years ago

wolfviking0 commented 4 years ago

Hello, I am playing with cppkafka. I would like to modify to part of the producer. 1 - reduce the time between each request currently is 100 ms 2 - Increase the size of the payload.

I tried something like that :

Configuration config = {
        { "metadata.broker.list", "127.0.0.1:9092" },
        { "socket.blocking.max.ms", "1" },
        { "linger.ms", "1" },
        { "max.partition.fetch.bytes", "100000000"} // 100 MB
    };

Its seems not working. I am new with Kafka so I am surely missing something. Any advice ?

Thanks

nilyin commented 3 years ago

I am also interested how to configure the "max.partition.fetch.bytes" correctly for cppkafka.

in my case I want to consumer no a single message but the batch of all, say, up to 10 messages/batch (if there are more than 10 messages, only 10 will be consumed, if there are less than 10 ones, than all available messages are consumed from the partition queue).

is it supported in cppkafka and how?