These are chat archives for arnaud-lb/php-rdkafka

24th
Aug 2016
nEAnnam
@nEAnnam
Aug 24 2016 14:29
$conf = new \RdKafka\Conf();
$conf->setDrMsgCb(function($kafka, $message) {
    echo $message->err;
});

$rk = new \RdKafka\Producer();
$rk->setLogLevel(LOG_DEBUG);
$rk->addBrokers("localhost:9092");

$conf = new \RdKafka\TopicConf();
$conf->set('request.required.acks', -1);
$conf->set('produce.offset.report', true);
$topic = $rk->newTopic("test", $conf);
$topic->produce(RD_KAFKA_PARTITION_UA, 0, "Message payload");

$rk->poll(100);
while($rk->getOutQLen())
            $rk->poll(100);
Magnus Edenhill
@edenhill
Aug 24 2016 15:56
@nEAnnam: You dont seem to pass the first $conf to Producer() ctor
nEAnnam
@nEAnnam
Aug 24 2016 17:12
OMG, lol
sorry
now works
thank you