NOT_FOUND - no queue 'orders.created' in vhost 'orders'
RabbitMQ 4.3.6 returns this when a channel asks for a queue that is not there. It is the loud half of the problem. The quiet half is the publish to the same missing queue, which gets no error at all.
We asked for a queue that does not exist in three ways, and all three closed the channel with the message above:
queue_declare(..., passive=True)), the usual "does it exist?" check;basic_consume;basic_get.Typical causes: the consumer starts before the service that declares the queue, a queue was deleted (or, for an exclusive or auto-delete queue, deleted itself), or the vhost is not the one you think. Declare the queues a consumer needs when it starts, or let it wait and retry until the owner has declared them.
Publishing to the default exchange with the queue name as routing key is the common way to "send to a queue". If the queue does not exist:
| Publish to a missing queue name | Result on 4.3.6 |
|---|---|
| with publisher confirms | confirmed; the message is dropped |
with confirms and mandatory=True | returned to the publisher (UnroutableError in pika) |
The confirm only says the broker took responsibility; a message that matches no queue is routed nowhere, and that counts as handled. Only mandatory asks the broker to say so. For anything you cannot afford to lose, publish with both confirms and mandatory=True, and handle the return.