[rabbitmq-discuss] Exchange performance

Michael Klishin michael.s.klishin at gmail.com
Fri Jun 17 12:55:05 BST 2011


2011/6/17 Max C <maxence.cordier at gmail.com>

> What happen to a message published to an exchange if no queue is
> suscribed to that exchange ?
>
>
If message cannot be routed to any queue because there are no bindings,
there are two scenarios:

* Messages with `mandatory` flag set will be returned to the producer
* Messages with `mandatory` flag off will be dropped.

If message can be routed (there are bindings) but no consumers, again, there
are two scenarios:

* Messages with `immediate` flag set will be returned to the producer
* Messages with `immediate` flag off will just stay in a queue they were
routed to.


>
> In my application, I have a bunch of devices sendind data to a
> rabbitMQ broker. I'm wondering if I should use 1 exchange for all my
> devices, tagging messages with the name of the device which send
> them ? Or if I should use 1 exchange per device.
>

You can use a single direct exchange but set routing key to device names.
Then each device can declare and consume messages from one queue named after
it.

-- 
MK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110617/704267fa/attachment.htm>


More information about the rabbitmq-discuss mailing list