19
19
use RdKafka \Conf ;
20
20
use RdKafka \KafkaConsumer ;
21
21
use RdKafka \Producer as VendorProducer ;
22
- use RdKafka \TopicConf ;
23
22
24
23
class RdKafkaContext implements Context
25
24
{
@@ -184,20 +183,18 @@ public static function getLibrdKafkaVersion(): string
184
183
private function getConf (): Conf
185
184
{
186
185
if (null === $ this ->conf ) {
187
- $ topicConf = new TopicConf ();
186
+ $ this -> conf = new Conf ();
188
187
189
188
if (isset ($ this ->config ['topic ' ]) && is_array ($ this ->config ['topic ' ])) {
190
189
foreach ($ this ->config ['topic ' ] as $ key => $ value ) {
191
- $ topicConf ->set ($ key , $ value );
190
+ $ this -> conf ->set ($ key , $ value );
192
191
}
193
192
}
194
193
195
194
if (isset ($ this ->config ['partitioner ' ])) {
196
- $ topicConf -> setPartitioner ( $ this ->config ['partitioner ' ]);
195
+ $ this -> conf -> set ( ' partitioner ' , $ this ->config ['partitioner ' ]);
197
196
}
198
197
199
- $ this ->conf = new Conf ();
200
-
201
198
if (isset ($ this ->config ['global ' ]) && is_array ($ this ->config ['global ' ])) {
202
199
foreach ($ this ->config ['global ' ] as $ key => $ value ) {
203
200
$ this ->conf ->set ($ key , $ value );
@@ -219,8 +216,6 @@ private function getConf(): Conf
219
216
if (isset ($ this ->config ['stats_cb ' ])) {
220
217
$ this ->conf ->setStatsCb ($ this ->config ['stats_cb ' ]);
221
218
}
222
-
223
- $ this ->conf ->setDefaultTopicConf ($ topicConf );
224
219
}
225
220
226
221
return $ this ->conf ;
0 commit comments