作者 庄敏学

kafka

@@ -13,7 +13,7 @@ func Run() { @@ -13,7 +13,7 @@ func Run() {
13 messageHandlerMap["demo-v1"] = Demo 13 messageHandlerMap["demo-v1"] = Demo
14 //"指定topic" => 对应的处理方法 14 //"指定topic" => 对应的处理方法
15 messageHandlerMap[constant.KAFKA_BUSINESS_TOPIC] = handle.SyncDataBusinessAdmin 15 messageHandlerMap[constant.KAFKA_BUSINESS_TOPIC] = handle.SyncDataBusinessAdmin
16 - err := saramaConsumer.StartConsume(constant.KAFKA_HOSTS, constant.SERVICE_NAME, messageHandlerMap, log.Logger) 16 + err := saramaConsumer.StartConsume(constant.KAFKA_HOSTS, constant.KAFKA_GROUP_ID, messageHandlerMap, log.Logger)
17 log.Logger.Error(err.Error()) 17 log.Logger.Error(err.Error())
18 } 18 }
19 19