PHP 5.9:
vagrant@vagrant$ php --version
PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct 3 2016 13:00:37)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
php-rdkafka 3.0.1 and librdkafka 0.9:
vagrant@vagrant$ php --ri rdkafka
rdkafka
rdkafka support => enabled
version => 3.0.1
build date => Feb 6 2017 14:43:27
librdkafka version (runtime) => 0.9.2-291-g281ca3
librdkafka version (build) => 0.9.4.0
/tmp/pear/install/rdkafka/rdkafka.c:662:19: note: each undeclared identifier is reported only once for each function it appears in
COPY_CONSTANT(RD_KAFKA_RESP_ERR__ISR_INSUFF);
^
/usr/include/php/20151012/Zend/zend_constants.h:42:105: note: in definition of macro ‘REGISTER_LONG_CONSTANT’
#define REGISTER_LONG_CONSTANT(name, lval, flags) zend_register_long_constant((name), sizeof(name)-1, (lval), (flags), module_number)
^
/tmp/pear/install/rdkafka/rdkafka.c:662:5: note: in expansion of macro ‘COPY_CONSTANT’
COPY_CONSTANT(RD_KAFKA_RESP_ERR__ISR_INSUFF);
^
make: *** [rdkafka.lo] Error 1
ERROR: `make' failed
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);