SQS: sendMessageToQueue лимиты+sync persist, Reset чистит FIFO, nil-map Duplicates, ApproximateReceiveCount без +1, billing.Close после Shutdown, запрет ':' в access_key, recover в PeriodicTasks

This commit is contained in:
Repinoid
2026-10-11 08:54:21 +03:00
parent e8e0879914
commit 120a44cb6a
6 changed files with 47 additions and 12 deletions
+6
View File
@@ -7,6 +7,7 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"strings"
"sync"
"time"
@@ -121,6 +122,11 @@ func (s *TenantStore) CreateFixedAutoID(name string, maxQueues int, accessKey, s
}
func (s *TenantStore) CreateFixed(name string, maxQueues int, tenantID, accessKey, secretKey string) (*Tenant, error) {
// access_key используется как префикс ключа "{accessKey}:{queueName}" —
// ':' в нём ломает изоляцию тенантов (ListQueues/коллизии ключей).
if strings.Contains(accessKey, ":") {
return nil, fmt.Errorf("access key must not contain ':'")
}
s.mu.Lock()
if _, exists := s.byID[tenantID]; exists {
s.mu.Unlock()