Skip to content

Dead-letter queue has no size cap — can grow unbounded in Redis #926

Description

@hman38705

Labels: reliability, email

Priority: Medium

Description

src/email/queue.rs pushes failed jobs to a Redis dead-letter queue list without any length limit. A sustained email failure (e.g., invalid SendGrid key) will fill the DLQ indefinitely, consuming Redis memory until eviction or OOM.

Acceptance Criteria

  • Add a configurable EMAIL_DLQ_MAX_SIZE (default 1000) using Redis LTRIM after each push to cap the list
  • When the cap is reached, emit a log.error and increment a dead_letter_queue_overflow_total counter
  • Add a Prometheus alert rule firing when DLQ size exceeds 80% of the cap
  • Add a test that overflows the cap and verifies the counter increments and oldest item is dropped

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programemailEmail service and queuereliabilityResilience, recovery, and uptime

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions