Skip to content

Commit 208ef4c

Browse files
authored
Merge pull request #562 from adumas37/fixing-kafka-default-configuration
Fixing kafka default configuration
2 parents 7316d06 + c286827 commit 208ef4c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

pkg/rdkafka/RdKafkaConnectionFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct($config = 'kafka:')
4444
throw new \LogicException('The config must be either an array of options, a DSN string or null');
4545
}
4646

47-
$this->config = array_replace($this->defaultConfig(), $config);
47+
$this->config = array_replace_recursive($this->defaultConfig(), $config);
4848
}
4949

5050
/**

pkg/rdkafka/Tests/RdKafkaConnectionFactoryTest.php

+14
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,19 @@ public static function provideConfigs()
107107
],
108108
],
109109
];
110+
111+
yield [
112+
[
113+
'global' => [
114+
'group.id' => 'group-id',
115+
],
116+
],
117+
[
118+
'global' => [
119+
'metadata.broker.list' => 'localhost:9092',
120+
'group.id' => 'group-id',
121+
],
122+
],
123+
];
110124
}
111125
}

0 commit comments

Comments
 (0)