<div dir="ltr">Accidentally forgot to attach the dump file.<div><br></div><div>-rb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 4, 2014 at 3:52 PM, Ryan Brown <span dir="ltr"><<a href="mailto:ryankbrown@gmail.com" target="_blank">ryankbrown@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">I have an application that acts as, essentially, a rest wrapper around rabbitmq. (There is obviously some special logic that makes it necessary to build our own).</span><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">

<br></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">Some background: We have been using this application (current code available at <a href="https://github.com/PearsonEducation/subpub" target="_blank">https://github.com/PearsonEducation/subpub</a>) as an internal pub/sub for several years now. It has now grown dramatically in importance to our vision and we are beginning to get inundated with requests for features and enhancements. One of those enhancements is to allow publishers to specify with a header whether they want the application to require confirmed publishing to rabbit. We had begun this process by checking for the header value and passing down the chain. However, we are not currently setting-up a channel that is set for publish confirms. Anyway, TMI...</div>

<div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">The state I'm in now is that, on startup, we create connections to each of our brokers. In this process we create a channel and save it in state. I have now added logic to create a second channel on that connection that sets:</div>

<div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px"><p> #'confirm.select_ok'{} = amqp_channel:call(ConfirmedChannel, #'confirm.select'{}),</p>

<p>And saves it to state. Then on publish, I select which one to use based on the values passed-down the stack from message intake. Set self() as the confirm handler and respond with a wait so that up the stack I can initiate a receive loop in the message intake which is not a gen_server. I have debug messages throughout and it appears that everything is happening as expected. I trace the message through the publish path. To being published and passing the wait back up to the receiver. I also see where the basic.ack is received and the publish_confirm acknowledgement passed all the way up to the receive loop. However, then things go awry. I get the attached dump.</p>

<p>My take-away, although likely I am wrong, is that somewhere, apparently in amqp_balanced_publisher, a gen_server call is timing-out while waiting for a response. But, I seem to be able to trace the responses through the whole stack so I am thoroughly confused.</p>

<p>I realize this is vague and additional details/code are likely still needed. Please let me know. I've spent way too much time on this already and it's getting quite frustrating. And I know I am likely missing something obvious but am finding supporting documentation for erlang lacking. But I'm probably just looking in the right places.</p>

<p>Best regards,</p><p>Ryan</p></div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>-rb
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>-rb
</div>