<div dir="ltr">Yea, racy indeed. I actually don&#39;t think we need to wait on a ShutdownListener since the basicPublish will eventually fail with AlreadyClosedException. That&#39;s fine as long as the Connection isn&#39;t shutdown as a result, which Steve mentioned in another thread (AlreadyClosedException always sets hardError...) is what should happen but which I haven&#39;t seen. Since I don&#39;t really have a fair chance to know that the Channel has been closed before getting an AlreadyClosedException, ideally the Connection wouldn&#39;t be closed as a result.<br>

<div><br></div><div>- jonathan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 21, 2013 at 12:25 PM, Matthias Radestock <span dir="ltr">&lt;<a href="mailto:matthias@rabbitmq.com" target="_blank">matthias@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 21/10/13 20:20, Jonathan Halterman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;m guessing I have to<br>
fallback to Channel.isOpen or wait for the ShutdownListener to be called?<br>
</blockquote>
<br></div>
That&#39;s racy. How long would you wait?<br>
<br>
The reason that basicPublish doesn&#39;t return an error is because doing so would require waiting for a response from the server, thus making basicPublish synchronous and destroying performance.<span class="HOEnZb"><font color="#888888"><br>

<br>
Matthias.</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</div></div></blockquote></div><br></div>