diff --git a/pkg/rdkafka/RdKafkaProducer.php b/pkg/rdkafka/RdKafkaProducer.php index a3c977f83..64b9ea3a7 100644 --- a/pkg/rdkafka/RdKafkaProducer.php +++ b/pkg/rdkafka/RdKafkaProducer.php @@ -115,11 +115,11 @@ public function getTimeToLive(): ?int return null; } - public function flush(int $timeout): void + public function flush(int $timeout): ?int { // Flush method is exposed in phprdkafka 4.0 if (method_exists($this->producer, 'flush')) { - $this->producer->flush($timeout); + return $this->producer->flush($timeout); } } }