lundi 26 mars 2018

Laravel didnt find PHP Library RdKafka

I'm getting

 Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR)
    Class 'RdKafka\Producer' not found 

But the library is loaded at php.ini, when i try with php artisan tinker, it works, but doesn't work in the web application

<?php

Route::get('/', function () {
    $topicConf = new RdKafka\TopicConf();
    $topicConf->set('auto.offset.reset', 'largest');

    $conf = new RdKafka\Conf();
    $conf->set('group.id', 'php-pubsub');
    $conf->set('metadata.broker.list', '127.0.0.1');
    $conf->set('enable.auto.commit', 'false');
    $conf->set('offset.store.method', 'broker');
    $conf->set('socket.blocking.max.ms', 50);
    $conf->setDefaultTopicConf($topicConf);
});



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire