完善队列集合的ACK确认机制
This commit is contained in:
parent
f290e7dd0c
commit
49f4d119ec
@ -35,7 +35,7 @@ func (q *Queues[TKey, TValue, TRoute]) SetExpireAutoFail(expireAutoFail time.Dur
|
||||
func (q *Queues[TKey, TValue, TRoute]) checkAckStatus(route TRoute) {
|
||||
if ack, ok := q.ack.Load(route); ok && !q.autoAck {
|
||||
if status, exist := <-ack.(chan bool); !status && exist {
|
||||
if msg, ok := q.msgs.Load(route); ok {
|
||||
if msg, ok := q.msgs.LoadAndDelete(route); ok {
|
||||
// 重新入队
|
||||
q.Enqueue(route, msg.(TValue))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user