thanks @edenhill - I've already set it to 1ms, but just going to upgrade to version 0.9.4 and see if that helps. Also, the way I was calling poll was with the following:
$this->getProducer()->poll(-1);
which from what I can gather waits until it gets a response. I tried changing to a while loop of $producer->poll(10);
etc but didn't see any difference - so are there any implications in using my original methodology of $this->getProducer()->poll(-1);
or any reasons not to do it that way etc?
$conf->set('client.id', 'track');
$conf->set('socket.blocking.max.ms', 1);
$conf->set('queue.buffering.max.ms', 1);
$conf->set('batch.num.messages', 1);
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