This commit is contained in:
2021-03-09 19:40:10 +08:00
parent fa108ada6f
commit a456d95e66
4 changed files with 17 additions and 32 deletions
+2 -6
View File
@@ -46,16 +46,12 @@ class Kafka extends \Snowflake\Process\Process
/**
* @param array $kafkaServer
* @throws ComponentException
* @throws \Exception
*/
private function waite(array $kafkaServer)
{
try {
$prefix = rtrim(Snowflake::app()->id, ':');
if (!Snowflake::getPlatform()->isMac()) {
swoole_set_process_name($prefix . ' Kafka Consumer ' . $kafkaServer['topic']);
}
name('Kafka Consumer ' . $kafkaServer['topic']);
[$config, $topic, $conf] = $this->kafkaConfig($kafkaServer);
if (empty($config) && empty($topic) && empty($conf)) {