浏览代码

wip:提交nsq配置

wangkaiyue 3 年之前
父节点
当前提交
efbe83a955
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      main.go

+ 1 - 1
main.go

@@ -22,7 +22,7 @@ func init() {
 func nsqWork() {
 	// Instantiate a consumer that will subscribe to the provided channel.
 	config := nsq.NewConfig()
-	consumer, err := nsq.NewConsumer("jy_event", gcfg.Instance().MustGet(gctx.New(), "nsq.channel", "event").String(), config)
+	consumer, err := nsq.NewConsumer(gcfg.Instance().MustGet(gctx.New(), "nsq.topic", "jy_event").String(), gcfg.Instance().MustGet(gctx.New(), "nsq.channel", "event").String(), config)
 	if err != nil {
 		log.Fatal(err)
 	}