diff --git a/CLAUDE.md b/CLAUDE.md index 15a2dbe..389b054 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,32 +38,123 @@ workers. Python >=3.13,<4.0, Poetry for dependency management. - `RabbitMQClient` — shared class, lazy `connect()` (can't be async `__init__`), holds one `connection` + one `channel`, `get_channel()` ensures setup. -- Topic exchange named `"email"`. Each message type gets its own routing key - (`email.welcome`, `email.reset`) and its own durable queue - (`queue_welcome_email`, `queue_reset_email`), each queue explicitly bound - to the exchange with its own key. -- **Important**: both producer and consumer must declare/bind the queues — - if only the consumer does it and the consumer has never run, `publish` - on a not-yet-existing queue silently loses the message. `EmailProducer.setup()` - also declares+binds both queues defensively. -- `message.process()` async context manager = manual ack (auto-ack on - success, requeue/nack on exception) — this is the right choice for email, - not `no_ack=True`. -- Email templates: Jinja2, inline CSS (email clients don't support `