feat: add memory service queues (processing, indexing, dlq)
- processing-queue: high-throughput, auto-scaling (1-4 shards) - indexing-queue: FIFO with deduplication (1-2 shards) - memory-dlq: dead letter queue for redelivery failures - ArgoCD Application (wave 7) to auto-sync queue lifecycle
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: kmsvc.io/v1
|
||||||
|
kind: Queue
|
||||||
|
metadata:
|
||||||
|
name: memory-dlq
|
||||||
|
namespace: sqs
|
||||||
|
spec:
|
||||||
|
isDLQ: true
|
||||||
|
visibilityTimeoutSeconds: 300
|
||||||
|
messageRetentionPeriodSeconds: 1209600 # 14 days
|
||||||
|
maxReceiveCount: 1 # DLQ itself shouldn't retry
|
||||||
|
partitionsPerShard: 1
|
||||||
|
minShards: 1
|
||||||
|
maxShards: 1
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: kmsvc.io/v1
|
||||||
|
kind: Queue
|
||||||
|
metadata:
|
||||||
|
name: memory-indexing
|
||||||
|
namespace: sqs
|
||||||
|
spec:
|
||||||
|
fifoQueue: true
|
||||||
|
visibilityTimeoutSeconds: 60
|
||||||
|
messageRetentionPeriodSeconds: 2592000 # 30 days
|
||||||
|
maxReceiveCount: 5
|
||||||
|
partitionsPerShard: 1
|
||||||
|
minShards: 1
|
||||||
|
maxShards: 2
|
||||||
|
delaySeconds: 0
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
namespace: sqs
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- processing-queue.yaml
|
||||||
|
- indexing-queue.yaml
|
||||||
|
- dlq.yaml
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
apiVersion: kmsvc.io/v1
|
||||||
|
kind: Queue
|
||||||
|
metadata:
|
||||||
|
name: memory-processing
|
||||||
|
namespace: sqs
|
||||||
|
spec:
|
||||||
|
fifoQueue: false
|
||||||
|
visibilityTimeoutSeconds: 120
|
||||||
|
messageRetentionPeriodSeconds: 604800 # 7 days
|
||||||
|
maxReceiveCount: 3
|
||||||
|
deadLetterTargetQueue: memory-dlq
|
||||||
|
partitionsPerShard: 3
|
||||||
|
minShards: 1
|
||||||
|
maxShards: 4
|
||||||
|
shardSplitThresholdBytesPerSec: 5242880
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: memory-queues
|
||||||
|
namespace: argocd
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "7"
|
||||||
|
spec:
|
||||||
|
project: homelab
|
||||||
|
source:
|
||||||
|
repoURL: https://forgejo.riotpiao.com/rock/homelab.git
|
||||||
|
targetRevision: main
|
||||||
|
path: k8s/apps/messaging/memory-queues
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: sqs
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
Reference in New Issue
Block a user