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

27th
Sep 2018
tambach
@tambach
Sep 27 2018 12:05
Hi everyone how can i add PHP-rdkafka into my composer.json?
tambach
@tambach
Sep 27 2018 12:57
I have an error like this PHP Fatal error: Uncaught Error: Class 'RdKafka\Producer' not found in ....
and want use the arnaud-lb/php-rdkafka using composer but i cant find it on packagist, Can anyone help me?
Thanks in advance
karavzeka
@karavzeka
Sep 27 2018 13:22
@tambach arnaud-lb/php-rdkafka is just source code for PHP extension. https://github.com/arnaud-lb/php-rdkafka - look in Installation section.
What is your OS?
tambach
@tambach
Sep 27 2018 13:24
thank you @karavzeka i have seen this github page, and install it but now i need it via composer. If i add "require":{
"arnaud-lb/php-rdkafka":"*"} will it be enough?
i 've macos but now i'm trying to execute my code in docker container
karavzeka
@karavzeka
Sep 27 2018 13:27
After installation (if it was successful) you don't need require anything.
tambach
@tambach
Sep 27 2018 13:30
i know this and i have tested but now i want to know it's not possible to use this lib with composer?
karavzeka
@karavzeka
Sep 27 2018 13:32
No. Only installation possible.
tambach
@tambach
Sep 27 2018 13:35
ok thank you so much, and if i install kafka and librdkafka via composer, and i ll install php-rdkafka manually it ll be ok?
karavzeka
@karavzeka
Sep 27 2018 13:40
I download this repo https://github.com/arnaud-lb/php-rdkafka and installed using this instruction https://arnaud-lb.github.io/php-rdkafka/phpdoc/rdkafka.installation.manual.html on linux. I didn't have problems.
There is another php library (https://github.com/weiboad/kafka-php) which fully written by php. You can require it by composer without installing. But I've never used it, so cant't tell something about it.
I only know is php-rdkafka is faster
tambach
@tambach
Sep 27 2018 13:45
the second library looks too difficult, i prefer php-rdkafka
karavzeka
@karavzeka
Sep 27 2018 13:46
Ok, good luck :smiley:
tambach
@tambach
Sep 27 2018 14:49
thx :D
tambach
@tambach
Sep 27 2018 16:55
s till have an error . :(
PHP Notice: Trying to get property of non-object in Bootstrap.php
kafka consumer can't get data
data is array of arrays
and i use serialize
i think producer works properly
there is no error and i can see what is sent to consumer
when i var_dumo $msg->payload its just false
What can i do