diff --git a/src/Producer/KafkaProducerBuilder.php b/src/Producer/KafkaProducerBuilder.php index ffada2a..487488f 100644 --- a/src/Producer/KafkaProducerBuilder.php +++ b/src/Producer/KafkaProducerBuilder.php @@ -157,8 +157,8 @@ public function build(): KafkaProducerInterface } //Thread termination improvement (https://github.com/arnaud-lb/php-rdkafka#performance--low-latency-settings) - $this->config['socket.timeout.ms'] = '50'; - $this->config['queue.buffering.max.ms'] = '1'; + $this->config['socket.timeout.ms'] = $this->config['socket.timeout.ms'] ?? '50'; + $this->config['queue.buffering.max.ms'] = $this->config['queue.buffering.max.ms'] ?? '1'; if (function_exists('pcntl_sigprocmask')) { pcntl_sigprocmask(SIG_BLOCK, array(SIGIO));