I can’t even set a stats_cb
as a config value as it throws the following error:
RdKafka\Exception: Property "stats_cb" must be set through dedicated .._set_..() function
# Kafka Installation
RUN apk update && apk add make g++ python autoconf php5-dev && \
# librdkafka
cd /tmp && git clone --depth 1 --branch v0.9.4 https://github.com/edenhill/librdkafka.git && \
cd /tmp/librdkafka && ./configure && make && make install && rm -rf /tmp/librdkafka && \
# php-rdkafka
cd /tmp && git clone --depth 1 --branch 3.0.1 https://github.com/arnaud-lb/php-rdkafka.git && \
cd /tmp/php-rdkafka && phpize && ./configure && make all -j 5 && make install && \
echo "extension=rdkafka.so" > /etc/php5/conf.d/rdkafka.ini && \
rm -rf /tmp/php-rdkafka
% Sending 500000 messages of size 100 bytes
% 500000 messages produced (50000000 bytes), 0 delivered (offset 0, 0 failed) in 1000ms: 0 msgs/s and 0.00 Mb/s, 0 produce failures, 500000 in queue, no compression
% 500000 messages produced (50000000 bytes), 500000 delivered (offset 0, 0 failed) in 1809ms: 276372 msgs/s and 27.64 Mb/s, 0 produce failures, 0 in queue, no compression