<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 30, 2013 at 7:28 PM, smallfish <span dir="ltr">&lt;<a href="mailto:smallfish.xy@gmail.com" target="_blank">smallfish.xy@gmail.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>Great! but miss some other protocol (ack/publish etc..) <br></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">:-)<br></div></blockquote><div>&nbsp;<br></div><div>STOMP was simplest to write in Lua so I went ahead with it after members from the community suggested for lua-resty.<br></div><div>In this library we do have publisher confirms by using STOMP RECEIPT which are acks from the RabbitMQ stomp adapter for a given receipt no. which we put on a SEND frame.<br>
</div><div>I see on the management web interface of RabbitMQ that channels are in confirm mode.<br><br></div><div>A typical use case for this library is to publish on localhost RMQ broker from resty/lua handler, in that case latency and network issues won&#39;t be much trouble.<br>
<br></div><div>Regards.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><div class="gmail_extra"><br clear="all"><div>--<div>
<div>smallfish&nbsp;<a href="http://chenxiaoyu.org" target="_blank">http://chenxiaoyu.org</a></div>
</div></div>
<br><br><div class="gmail_quote"><div><div class="h5">On Thu, May 30, 2013 at 9:45 PM, Rohit Yadav <span dir="ltr">&lt;<a href="mailto:rohit.yadav@wingify.com" target="_blank">rohit.yadav@wingify.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<div dir="ltr"><div>Hi,<br><br></div><div>I started working on implementing a client library for RabbitMQ based on STOMP 1.2 protocol, I&#39;m sharing the initial buggy version [1] with the community for feedback, suggestions and review.<br>


<br></div><div>For the initial version I&#39;ve implemented only authentication and publishing using receipts. I&#39;ll blog about this work with some history and background soon [2].<br></div><div><br></div><div>To test this library I wrote a load testing tool in golang which would run concurrent HTTP requests to an Openresty server. A handler runs Lua code for that request and uses the resty-rabbitmq library to sanitize, serialize and publish data to RabbitMQ&#39;s STOMP adapter.<br>


<br></div><div>With a noncurrent load test of total 1M requests, using the library a producer (in /example/) was able to publish all the messages to the broker without any errors. But in case of 
concurrent connections, I frequently got timeout errors or writing to 
closed socket errors. <br><br>How may I make publishing fault tolerant and avoid deduplicating messages in concurrent environment by correctly implementing states and reuse sockets using cosocket api pool? I set keepalive timeout on the cosocket tcp sock to 0 (no timeout as per wiki) and I saw exponential increase in socket consumed via the RabbitMQ management web interface, for a load of 100k requests, I saw fluctuations between 200-1200 consumed sockets with a lot of socket errors.<br>


<br>Ideas, flames? Thanks.<br><br>[1] <a href="https://github.com/wingify/lua-resty-rabbitmq" target="_blank">https://github.com/wingify/lua-resty-rabbitmq</a><br>[2] <a href="http://engineering.wingify.com/" target="_blank">http://engineering.wingify.com/</a><br>


<br></div><div>Regards,<br></div><div>Rohit Yadav</div></div></div></div><span><font color="#888888">

<p></p>

-- <br><span class="HOEnZb"><font color="#888888">
-- <br>
�ʼ������б�&ldquo;openresty&rdquo;,ר���ڼ�������!<br>
����: �뷢�հ��ʼ��� <a href="mailto:openresty%2Bsubscribe@googlegroups.com" target="_blank">openresty+subscribe@googlegroups.com</a><br>
����: �뷢�ʼ��� <a href="mailto:openresty@googlegroups.com" target="_blank">openresty@googlegroups.com</a><br>
�˶�: �뷢�ʼ��� <a href="mailto:openresty%2Bunsubscribe@googlegroups.com" target="_blank">openresty+unsubscribe@googlegroups.com</a><br>
�鵵: <a href="http://groups.google.com/group/openresty" target="_blank">http://groups.google.com/group/openresty</a><br>
����: <a href="http://openresty.org/" target="_blank">http://openresty.org/</a><br>
�ֿ�: <a href="https://github.com/agentzh/ngx_openresty" target="_blank">https://github.com/agentzh/ngx_openresty</a><br>
�̳�: <a href="http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html" target="_blank">http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html</a><br>
&nbsp;<br>
&nbsp;<br>
</font></span></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &quot;openresty-en&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:openresty-en%2Bunsubscribe@googlegroups.com" target="_blank">openresty-en+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/groups/opt_out" target="_blank">https://groups.google.com/groups/opt_out</a>.<br>
&nbsp;<br>
&nbsp;<br>
</font></span></blockquote></div><br></div></div>