Ver código fonte

wip:提交nsq配置

wangkaiyue 3 anos atrás
pai
commit
efbe83a955
1 arquivos alterados com 1 adições e 1 exclusões
  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)
 	}