Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kafka client for PHP

I have a problem with Kafka PHP client on Windows (using xampp). I have installed Apache Kafka 0.8 and tested successfully. Then, I'm finding a PHP client to integrate Kafka to PHP, I just only want to make PHP can produce messages to Kafka (no consume).

By this link: https://cwiki.apache.org/confluence/display/KAFKA/Clients#Clients-PHP I found: https://github.com/EVODelavega/phpkafka

But this PHP Kafka client is being develop and the installation of this extension is more complex (requied librdkafka)

I have tried with other clients but no one work for me.

  • https://github.com/nmred/kafka-php
  • https://github.com/quipo/kafka-php

Does anyone have the same problem with me? Is there simple solution to integrate Kafka to PHP?

like image 713
Tín Phạm Avatar asked Aug 21 '15 02:08

Tín Phạm


People also ask

Can I use Kafka with PHP?

There are several PHP clients for Kafka. I recommend using this Compose, because it shows better performance than some other PHP clients. Now go to same folder in which Kafka is configured and run the command.

What is Kafka client?

Kafka Python ClientPython client that provides a high-level producer, consumer, and AdminClient.

What is Apache Kafka tutorial?

Apache Kafka Tutorial provides the basic and advanced concepts of Apache Kafka. This tutorial is designed for both beginners and professionals. Apache Kafka is an open-source stream-processing software platform which is used to handle the real-time data storage.


1 Answers

IMHO the most active Kafka client for PHP is arnaud-lb/php-rdkafka. I managed to compile and run it successfully on OSX and Linux.

like image 142
Erik B Avatar answered Oct 13 '22 13:10

Erik B