<font face="arial" size="2"><p style="margin:0;padding:0;">Hi Matthias,</p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;">I didn't believe it at first either ;) Our java lead got a little pissed as I kept demanding proof that it was the same connection hehe... there are seperate channels on one connection...</p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;">brilliant - async it is for now... I really need to remove this showstopper and come back to the cause later - crashes aren't good, but, having someone's phone just hang there is a killer!! As the exchanges are getting created 100% of the time I can live without a reply..</p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;">thanks for all your help,</p>
<p style="margin:0;padding:0;">Matthew</p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;">-----Original Message-----<br />From: "Matthias Radestock" <matthias@rabbitmq.com><br />Sent: Friday, August 24, 2012 5:08pm<br />To: m.luchak@smartasking.com<br />Cc: "Discussions about RabbitMQ" <rabbitmq-discuss@lists.rabbitmq.com><br />Subject: Re: [rabbitmq-discuss] Intermittent Problem - 2.8.5 java client hangs on declare exchange<br /><br /></p>
<div id="SafeStyles1345843013">
<p style="margin:0;padding:0;">Matthew,<br /><br />On 24/08/12 21:49, m.luchak@smartasking.com wrote:<br />> While the client wait() is well, waiting, the device receives incoming<br />> messages - so there is a connection and the heartbeat is running<br />> normally and happily.<br /><br />The latter is on a different connection though, right? i.e. you are not <br />receiving messages on the same connection that has a stuck <br />exchange.declare, are you? That would be odder still.<br /><br />> BTW, In the Javadocs there is an Exchange.Declare with a nowait boolean :<br />><br />> AMQImpl.Exchange.Declare(int ticket, java.lang.String exchange,<br />> java.lang.String type, boolean passive, boolean durable, boolean<br />> autoDelete, boolean internal, boolean nowait,<br />> java.util.Map<java.lang.String,java.lang.Object> arguments)<br />><br />> However, this option is not available in the 2.8.1 or 2.8.6 .jar files<br />> or source files... can anyone tell me if this overide is in a nightly<br />> build and/or if it's irrelevant to the task at hand?<br /><br />Most synchronous AMQP commands have an async variant, triggered by <br />setting the nowait flag. We don't expose convenience methods for that in <br />the API but you can use Channel.asyncRpc(Method method) to send commands <br />like that, e.g.<br /><br />import com.rabbitmq.client.impl.AMQImpl.Exchange;<br /><br /> channel.asyncRpc(new Exchange.Declare.Builder()<br /> .exchange("myexchange")<br /> .type("direct")<br /> .nowait(true)<br /> .build());<br /><br />Matthias.</p>
</div></font>