作者 庄敏学

kafka

不能预览此文件类型
package service
type AuthService struct {
}
... ...
... ... @@ -11,7 +11,7 @@ import (
func Run() {
messageHandlerMap := make(map[string]func(message *sarama.ConsumerMessage) error)
messageHandlerMap["demo-v1"] = Demo
//messageHandlerMap["demo-v1"] = Demo
//"指定topic" => 对应的处理方法
messageHandlerMap[constant.KAFKA_BUSINESS_TOPIC] = handle.SyncDataBusinessAdmin
hosts := strings.Split(constant.KAFKA_HOSTS, ",")
... ...