fix(fifo): ContentBasedDeduplication + dedup window survives delete (AWS semantics)
- ContentBasedDeduplication=true: dedupId computed from body SHA-256 when not provided - do NOT drop dedupId on message delete: AWS keeps the 5-minute window regardless (previously re-send after delete delivered the message again) - utils: GetSHA256Hash
This commit is contained in:
@@ -56,7 +56,9 @@ func DeleteMessageV1(req *http.Request) (int, interfaces.AbstractResponseBody) {
|
||||
queue.ClearInFlight(i, receiptHandle)
|
||||
queue.UnlockGroup(msg.GroupID)
|
||||
queue.RemoveIndex(i) // tombstone за O(1) + подрезка хвоста/амортизированная компакция
|
||||
delete(queue.Duplicates, msg.DeduplicationID)
|
||||
// ВАЖНО: запись в Duplicates НЕ удаляем — AWS держит dedup-окно 5 минут
|
||||
// независимо от удаления сообщения (иначе повторный send с тем же
|
||||
// dedupId доставлялся бы повторно). Чистит только истечение окна (PeriodicTasks).
|
||||
// Удаляем одно сообщение из Redis — O(1)
|
||||
persistence.DeleteMessagePersist(key, msg.Uuid)
|
||||
// Метаданные очереди (duplicates, FIFO state)
|
||||
|
||||
Reference in New Issue
Block a user