go_rocket_mq
转到rocketmq客户端#import导入rocketmq“ github.com/didapinchegit/go_rocket_mq”
#example conf:=&rocketmq.Config {名称服务器:“ 192.168.1.234:9876”,ClientIp:“ 192.168.1.23”,InstanceName:“ DEFAULT”,}消费者,err:= rocketmq.NewDefaultConsumer(“ C_TEST”,conf)如果err!= nil {log.Panic(err)} Consumer.Subscribe(“ test2”,“ ”)Consumer.Subscribe(“ test3”,“ ”)Consumer.RegisterMessageListener(func(msgs [] * rocketmq.
2023-01-12 15:18:51
21KB
Go
1