SQS: sendMessageToQueue лимиты+sync persist, Reset чистит FIFO, nil-map Duplicates, ApproximateReceiveCount без +1, billing.Close после Shutdown, запрет ':' в access_key, recover в PeriodicTasks
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user