<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2013/5/13 François Beausoleil <span dir="ltr"><<a href="mailto:francois@teksol.info" target="_blank">francois@teksol.info</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When the request hits the web server process, is it expected that it would open a channel, create a server-named queue and send the request, with reply-to set to the queue?</blockquote></div><br>It doesn't have to open a new channel but it is fine if you do so (opening a channel is a network roundtrip with a tiny payload).<br>
<br clear="all"><div style>Your thinking is basically correct. You can combine Ruby's Timeout and while !(r = queue.get)</div><div style>to get a response back in under N milliseconds.</div><div style><br></div><div style>
This won't be a particularly efficient combination because Timeout starts a new thread for every Timeout.timeout</div><div style>call but there are no other straightforward options with Rails/Sinatra and Bunny.</div>
<div style>
<br></div><div style>I'm not sure I understand the "optional data" part. Could you elaborate?</div>-- <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><br>
</div></div>