Skip to content
Advertisement

PHP with Kafka – rdkafka

Iam dealing with kafka and php, Im beginner the kafka has been set upped correctly on the server,

now am on local I have installed: librdkafka.dll on xamp/php and php_rdkafka.dll on xamp/php/ext

and i added this on php.ini:

extension=php_rdkafka.dll

then, i have created a php page contains this code:

JavaScript

Advertisement

Answer

Are you trying to connect to confluent cloud?

I would add to your conf your security protocol, as you indicate sasl. eg $conf->set(‘security.protocol’,’sasl_ssl’);

I would think you would not need to indicate the brokers in the producer, as you have already done this in the config. I am presuming your broker list is a csv formatted file that include host and port number?

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement