Production-ready

The checklist the mailer meets, and how it meets each item, with the page that builds it. Check your own RabbitMQ worker against it.

The mailer meets each item. Check your own worker against them:

ItemHowWhere
Every setting sourced and checked; a bad one exits 78, naming its variableconfig.Struct and the packages’ checksThe settings
No secret in the environment, the logs or the spansthe RabbitMQ password, the provider’s key and the probes’ certificate are files read through s.Host.FSThe secrets, as files
Certificates renewed without a restartthe probes’ certificate is served through GetCertificate, by a small helper of the walkthrough’s own that reads its files again when they changeThe probes
No personal data in the telemetryaddresses and bodies are never logged or put on a spanWhat it records
Two replicas, competing for one queuea PodDisruptionBudget of minAvailable: 1The disruption budget
Ready only once it consumesConsuming as readiness, on a probes serverThe probes
A rollout loses nothing, and sends nothing twiceSIGTERM cancels the consumer, finishes the deliveries in flight within 25s, and nacks the rest, which counts nothing against them. terminationGracePeriodSeconds: 35The grace period
A broker’s rolling restart costs no restartthe Service reconnects. The deliveries that were in flight are redelivered, and the idempotency key sends them onceThe request and its key
A dependency’s outage is ridden outthe client’s retries, then the delay queue, then the parking lot after MAIL_MAX_ATTEMPTS. The breaker sheds calls while the provider keeps failingRetries and dead letters
No request stops the workermalformed requests go to the parking lot at once. The rest are parked in mail.send.retry, an event that can’t be published included, and dead-lettered after MAIL_MAX_ATTEMPTS. Only a request that can go to neither mail.retry nor mail.dead stops the worker, and the delivery limit dead-letters it after 5 deliveriesThe delivery limit
Least privilegeno configure permission on the broker; write and read on its own exchanges and queue only, granted with rabbitmqctl set_permissions. No service account token. A non-root, read-only containerThe logins, The Deployment
Observabletraces, logs and metrics over OTLP, and the alerts in deploy/alerts.yamlObserving
Failures say whyeach dead letter’s reason headers, and the mail.refused eventDead letters, The events
Failures are rehearsedthe failure injection casesThe failure injection cases
Safe by defaultTrustScenario trusts no publisher; the sender’s address is a settingTrustScenario