[rabbitmq-discuss] [openresty-en] Re: [openresty] New lua-resty-rabbitmq library

Rohit Yadav rohit.yadav at wingify.com
Thu May 30 15:26:37 BST 2013


On Thu, May 30, 2013 at 7:28 PM, smallfish <smallfish.xy at gmail.com> wrote:

> Great! but miss some other protocol (ack/publish etc..)
>
:-)
>

STOMP was simplest to write in Lua so I went ahead with it after members
from the community suggested for lua-resty.
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.
I see on the management web interface of RabbitMQ that channels are in
confirm mode.

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't be
much trouble.

Regards.


> --
> smallfish http://chenxiaoyu.org
>
>
> On Thu, May 30, 2013 at 9:45 PM, Rohit Yadav <rohit.yadav at wingify.com>wrote:
>
>> Hi,
>>
>> I started working on implementing a client library for RabbitMQ based on
>> STOMP 1.2 protocol, I'm sharing the initial buggy version [1] with the
>> community for feedback, suggestions and review.
>>
>> For the initial version I've implemented only authentication and
>> publishing using receipts. I'll blog about this work with some history and
>> background soon [2].
>>
>> 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's STOMP adapter.
>>
>> 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.
>>
>> 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.
>>
>> Ideas, flames? Thanks.
>>
>> [1] https://github.com/wingify/lua-resty-rabbitmq
>> [2] http://engineering.wingify.com/
>>
>> Regards,
>> Rohit Yadav
>>
>> --
>> --
>> 邮件来自列表“openresty”,专用于技术讨论!
>> 订阅: 请发空白邮件到 openresty+subscribe at googlegroups.com
>> 发言: 请发邮件到 openresty at googlegroups.com
>> 退订: 请发邮件至 openresty+unsubscribe at googlegroups.com
>> 归档: http://groups.google.com/group/openresty
>> 官网: http://openresty.org/
>> 仓库: https://github.com/agentzh/ngx_openresty
>> 教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "openresty-en" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openresty-en+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130530/45572ed2/attachment.htm>


More information about the rabbitmq-discuss mailing list