dengbiao 1 dzień temu
rodzic
commit
2d30d33c89
2 zmienionych plików z 2 dodań i 3 usunięć
  1. +1
    -2
      consume/egg_energy_team_assistance_consume.go
  2. +1
    -1
      consume/md/consume_key.go

+ 1
- 2
consume/egg_energy_team_assistance_consume.go Wyświetl plik

@@ -29,7 +29,7 @@ func EggEnergyTeamAssistanceConsume(queue md.MqQueue) {
//1、将自己绑定到交换机上 //1、将自己绑定到交换机上
ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey)
//2、取出数据进行消费 //2、取出数据进行消费
ch.Qos(2)
ch.Qos(10)
delivery := ch.Consume(queue.Name, false) delivery := ch.Consume(queue.Name, false)


egg_system_rules.Init(cfg.RedisAddr) egg_system_rules.Init(cfg.RedisAddr)
@@ -56,7 +56,6 @@ func EggEnergyTeamAssistanceConsume(queue md.MqQueue) {
} }


func handleEggEnergyTeamAssistanceDataConsume(msgData []byte) error { func handleEggEnergyTeamAssistanceDataConsume(msgData []byte) error {
return nil
time.Sleep(time.Duration(10) * time.Millisecond) //休眠100毫秒 time.Sleep(time.Duration(10) * time.Millisecond) //休眠100毫秒
// 1.解析mq中queue的数据结构体 // 1.解析mq中queue的数据结构体
var msg *md2.EggEnergyTeamAssistanceReq var msg *md2.EggEnergyTeamAssistanceReq


+ 1
- 1
consume/md/consume_key.go Wyświetl plik

@@ -274,7 +274,7 @@ var RabbitMqQueueKeyList = []*MqQueue{
}, },
{ {
ExchangeName: "egg.energy", ExchangeName: "egg.energy",
Name: "egg_energy_team_assistance",
Name: "egg_energy_team_assistance_back",
Type: DirectQueueType, Type: DirectQueueType,
IsPersistent: false, IsPersistent: false,
RoutKey: "egg_energy_team_assistance", RoutKey: "egg_energy_team_assistance",


Ładowanie…
Anuluj
Zapisz