@@ -65,7 +65,7 @@ protected function makeRedisAdapter(array $config)
6565 $ config ['read_write_timeout ' ] = 0 ;
6666 }
6767
68- $ client = $ this ->container ->make ('pubsub.redis.redis_client ' , ['config ' => $ config ]);
68+ $ client = $ this ->container ->makeWith ('pubsub.redis.redis_client ' , ['config ' => $ config ]);
6969
7070 return new RedisPubSubAdapter ($ client );
7171 }
@@ -80,21 +80,21 @@ protected function makeRedisAdapter(array $config)
8080 protected function makeKafkaAdapter (array $ config )
8181 {
8282 // create producer
83- $ producer = $ this ->container ->make ('pubsub.kafka.producer ' );
83+ $ producer = $ this ->container ->makeWith ('pubsub.kafka.producer ' );
8484 $ producer ->addBrokers ($ config ['brokers ' ]);
8585
8686 // create consumer
87- $ topicConf = $ this ->container ->make ('pubsub.kafka.topic_conf ' );
87+ $ topicConf = $ this ->container ->makeWith ('pubsub.kafka.topic_conf ' );
8888 $ topicConf ->set ('auto.offset.reset ' , 'smallest ' );
8989
90- $ conf = $ this ->container ->make ('pubsub.kafka.conf ' );
90+ $ conf = $ this ->container ->makeWith ('pubsub.kafka.conf ' );
9191 $ conf ->set ('group.id ' , array_get ($ config , 'consumer_group_id ' , 'php-pubsub ' ));
9292 $ conf ->set ('metadata.broker.list ' , $ config ['brokers ' ]);
9393 $ conf ->set ('enable.auto.commit ' , 'false ' );
9494 $ conf ->set ('offset.store.method ' , 'broker ' );
9595 $ conf ->setDefaultTopicConf ($ topicConf );
9696
97- $ consumer = $ this ->container ->make ('pubsub.kafka.consumer ' , ['conf ' => $ conf ]);
97+ $ consumer = $ this ->container ->makeWith ('pubsub.kafka.consumer ' , ['conf ' => $ conf ]);
9898
9999 return new KafkaPubSubAdapter ($ producer , $ consumer );
100100 }
@@ -112,7 +112,7 @@ protected function makeGoogleCloudAdapter(array $config)
112112 'projectId ' => $ config ['project_id ' ],
113113 'keyFilePath ' => $ config ['key_file ' ],
114114 ];
115- $ client = $ this ->container ->make ('pubsub.gcloud.pub_sub_client ' , ['config ' => $ clientConfig ]);
115+ $ client = $ this ->container ->makeWith ('pubsub.gcloud.pub_sub_client ' , ['config ' => $ clientConfig ]);
116116
117117 $ clientIdentifier = array_get ($ config , 'client_identifier ' );
118118 $ autoCreateTopics = array_get ($ config , 'auto_create_topics ' , true );
0 commit comments