2011/6/17 Max C <span dir="ltr">&lt;<a href="mailto:maxence.cordier@gmail.com">maxence.cordier@gmail.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

<div id=":za">What happen to a message published to an exchange if no queue is<br>suscribed to that exchange ?<br><br></div></blockquote><div><br></div><div>If message cannot be routed to any queue because there are no bindings, there are two scenarios:</div>

<div><br></div><div><div>* Messages with `mandatory` flag set will be returned to the producer</div><div>* Messages with `mandatory` flag off will be dropped.</div></div><div><br></div><div>If message can be routed (there are bindings) but no consumers, again, there are two scenarios:</div>

<div><br></div><div>* Messages with `immediate` flag set will be returned to the producer</div><div>* Messages with `immediate` flag off will just stay in a queue they were routed to.</div><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

<div id=":za"><br>In my application, I have a bunch of devices sendind data to a<br>rabbitMQ broker. I&#39;m wondering if I should use 1 exchange for all my<br>devices, tagging messages with the name of the device which send<br>

them ? Or if I should use 1 exchange per device.</div></blockquote></div><br>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.<br clear="all">

<br>-- <br>MK