After you move a few tasks to the background with RabbitMQ you may realize that you eventually need to support different priorities for the same type of tasks, sending bulk email after you send transactional email. RabbitMQ doesn't have priorities so you wind up having to use separate queues for each priority.
You should already have a worker that can send the email, just now you need setup RabbitMQ with priorities.
The main exchange you use,
email-undeliverable that is declared as a fanout exchange. Now you just
default queue bound to the
default routing key for the
email-undeliverable. Now every email your try
to send that doesn't have a specifically prioritized queue will be routed
All you need now is to start your workers consuming from each queue you create.