|
|
@@ -32,7 +32,7 @@ func CanalGuideOrderConsume(queue md.MqQueue) { |
|
|
|
ch.Bind(queue.Name, queue.ExchangeName, queue.RoutKey) |
|
|
|
//2、取出数据进行消费 |
|
|
|
ch.Qos(500) |
|
|
|
delivery := ch.Consume(queue.Name) |
|
|
|
delivery := ch.Consume(queue.Name, true) //设置自动应答 |
|
|
|
|
|
|
|
geoIp2db, _ := geoip2db.NewGeoipDbByStatik() |
|
|
|
defer geoIp2db.Close() |
|
|
@@ -46,7 +46,7 @@ func CanalGuideOrderConsume(queue md.MqQueue) { |
|
|
|
fmt.Println(">>>>>>>>>>>>>>>>>>CanalGuideOrderConsume<<<<<<<<<<<<<<<<<<<<<<<<<") |
|
|
|
err = handleGuideOrdTable(res.Body, geoIp2db) |
|
|
|
//_ = res.Reject(false) |
|
|
|
_ = res.Ack(true) |
|
|
|
//_ = res.Ack(true) |
|
|
|
} else { |
|
|
|
panic(errors.New("error getting message")) |
|
|
|
} |
|
|
|