28 lines
449 B
Go
28 lines
449 B
Go
package mq
|
|
|
|
import (
|
|
"qteam/app/utils/mq"
|
|
)
|
|
|
|
func startQunue(name string, method interface{}, mqTp string, tp int, exhange string) {
|
|
if tp == 1 {
|
|
go mq.MqManager.GetMqByName(mqTp).Consume(name, method)
|
|
} else {
|
|
go mq.MqManager.GetMqByName(mqTp).DelyConsume(name, method)
|
|
}
|
|
|
|
}
|
|
|
|
// 队列服务
|
|
func StartQunueServer() error {
|
|
StartServer()
|
|
select {}
|
|
return nil
|
|
}
|
|
|
|
// 开启队列
|
|
func StartServer() error {
|
|
//startWorkers()
|
|
return nil
|
|
}
|