Commit 30057e99 authored by hangjun83's avatar hangjun83

openapi 震坤行

parent 8c7e47a8
...@@ -84,7 +84,6 @@ class KafkaService ...@@ -84,7 +84,6 @@ class KafkaService
$this->config['topic'] = 'zkh'; $this->config['topic'] = 'zkh';
$this->kafkaConsumerConfig = $this->getConsumerConfig($this->config); $this->kafkaConsumerConfig = $this->getConsumerConfig($this->config);
$consumer = new Consumer($this->kafkaConsumerConfig, function (ConsumeMessage $message) { $consumer = new Consumer($this->kafkaConsumerConfig, function (ConsumeMessage $message) {
try{ try{
$consumer = $message->getConsumer(); $consumer = $message->getConsumer();
$kafkaMessage = json_decode($message->getValue(),true); $kafkaMessage = json_decode($message->getValue(),true);
...@@ -93,8 +92,8 @@ class KafkaService ...@@ -93,8 +92,8 @@ class KafkaService
}catch(\Throwable $exception){ }catch(\Throwable $exception){
$this->errLog($exception,$this->kafkaConsumerConfig->getGroupInstanceId().'_consumer'); $this->errLog($exception,$this->kafkaConsumerConfig->getGroupInstanceId().'_consumer');
} }
$consumer->stop(); $consumer->stop();
exit;
}); });
$consumer->start(); $consumer->start();
$consumer->close(); $consumer->close();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment