dengbiao 4 months ago
parent
commit
d5b49dc4e5
1 changed files with 6 additions and 5 deletions
  1. +6
    -5
      consume/one_circles_sign_in_consume.go

+ 6
- 5
consume/one_circles_sign_in_consume.go View File

@@ -39,11 +39,12 @@ func OneCirclesSignInGreenEnergyConsume(queue md.MqQueue) {
if err != nil {
fmt.Println("err ::: ", err)
utils.FilePutContents("OneCirclesSignInGreenEnergyConsume_ERR", "[err]:"+err.Error())
_ = res.Reject(false)
//TODO::重新推回队列末尾,避免造成队列堵塞
var msg *md.OneCirclesStructForSignIn
json.Unmarshal(res.Body, &msg)
ch.Publish(queue.ExchangeName, msg, queue.RoutKey)
_ = res.Reject(true)
//_ = res.Reject(false)
////TODO::重新推回队列末尾,避免造成队列堵塞
//var msg *md.OneCirclesStructForSignIn
//json.Unmarshal(res.Body, &msg)
//ch.Publish(queue.ExchangeName, msg, queue.RoutKey)
} else {
_ = res.Ack(true)
}


Loading…
Cancel
Save