<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>But what is your problem exactly? Yes, for some time that "ghost" connection may be present until server realises the client has gone but I do not see how it prevents your service from successfully restarting.</div><div>If you declare queue as auto-delete, non-durable, non-exclusive and your user is permitted to do it the first time, then later when your service restarts and the queue already exists, you will still be able to declare it again with the same parameters. It won't cause error. So your second service will be able to start consuming from the same queue.</div><div><br></div><div>However, I have a strong feeling that what you really need instead is exclusive queue which you declare without providing a name so the server chooses a random name for you. So each time your service starts - a new queue is created and it ceases to exist when connection disappears. (Which can still take long but it should not be a problem as when new service starts - a new queue is created for it)</div><div><br></div><div>What is wrong with this approach?<br><br></div><div><br>On 4 Jul 2013, at 17:27, Jose Ramon Palanco &lt;<a href="mailto:jpalanco@gmail.com">jpalanco@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>Michael,<br><br></div><div>Thank you for your quick reponse. We only need one consumer per queue. We already have AD (autodelete) and durable is setted to false. We tried exclusive and non-exclusive. We still have ghost connections and consumers even when the computers running the clients are powered off.<br>
<br>Console:<br><a href="http://img827.imageshack.us/img827/9159/pce2.png">http://img827.imageshack.us/img827/9159/pce2.png</a><br><br></div><div>I read that it could be due the NAT, but I have reproduced the same issue connected directly.<br>
<br><br></div><div><br></div>Regards<br><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/7/4 Michael Klishin <span dir="ltr">&lt;<a href="mailto:michael.s.klishin@gmail.com" target="_blank">michael.s.klishin@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><br><div class="gmail_quote">2013/7/4 Jose Ramon Palanco <span dir="ltr">&lt;<a href="mailto:jpalanco@gmail.com" target="_blank">jpalanco@gmail.com</a>&gt;</span><br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

After reboot, the service starts and when trying to create the queue, it conflicts with the former queue. We tried to create the queue as exclusive, but it doesn't allow us to connect because we haven't permission.</blockquote>





</div><br></div>Is it because you have multiple connections using the queue?</div><div class="gmail_extra"><br clear="all"><div>If you consumer from the queue, you can declare it as auto-delete and non-durable instead of exclusive. Then as soon as the last consumer (registered with basic.consume, not using basic.get) is gone, it will be deleted.</div>



<span><font color="#888888">

-- <br>MK<br><br><a href="http://github.com/michaelklishin" target="_blank">http://github.com/michaelklishin</a><br><a href="http://twitter.com/michaelklishin" target="_blank">http://twitter.com/michaelklishin</a></font></span><br>


</div></div></blockquote></div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rabbitmq-discuss mailing list</span><br><span><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a></span><br><span><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq..com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></span><br></div></blockquote>
This email is for the use of the intended recipient(s) only. If you have received this email in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this email without the author's prior permission. AlertMe.com Ltd. is not responsible for any personal views expressed in this message or any attachments that are those of the individual sender.<br/>
<br/>
AlertMe.com Ltd, 30 Station Road, Cambridge, CB1 2RE, UK.<br/>
Registered in England, Company number 578 2908, VAT registration number GB 895 9914 42.<br/>
</body></html>