setErrorCb

Description

public function setErrorCb(callable $callback): void {}

Gets triggered for every error that occurs in librdkafka, keep in mind
that non-critical errors will be retried by libdrkafka

Example

$conf = new SimpleKafkaClient\Configuration();
$conf->setErrorCb(
    function (SimpleKafkaClient\Kafka $kafka, $errorCode, $reason) {
        //do something
    }
);