[ANN] lua-resty-kafka

357 views
Skip to first unread message

DeJiang Zhu

unread,
Dec 11, 2014, 12:53:57 PM12/11/14
to open...@googlegroups.com, openre...@googlegroups.com
I'd like to announce the first release of the simple kafka driver.

Only producer has be implemented now, any feedback are welcome :)

DeJiang Zhu

unread,
Dec 11, 2014, 1:07:35 PM12/11/14
to openre...@googlegroups.com, open...@googlegroups.com

2014-12-12 2:02 GMT+08:00 Lord Nynex <lord...@gmail.com>:
Do you have a link to the project?

On Thu, Dec 11, 2014 at 9:53 AM, DeJiang Zhu <douji...@gmail.com> wrote:
I'd like to announce the first release of the simple kafka driver.

Only producer has be implemented now, any feedback are welcome :)

--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

黄川

unread,
Mar 2, 2016, 7:47:16 PM3/2/16
to openresty, openre...@googlegroups.com
Hi Doujiang,lua-resty-kafka很不错,我们用kafka做pipeline, 如果nginx可以直接做producer最好,可以不用单写一个服务来做producer了。所以想请问一下现在status还在早期开发阶段吗?状况如何呢?谢谢!

DeJiang Zhu

unread,
Mar 3, 2016, 4:11:01 AM3/3/16
to open...@googlegroups.com
Hello

哈哈,应该是已经达到生产状态了哈,欢迎尝试哈
我这边是有重要服务的线上使用了,每天百亿的量级
不过,我的开发和线上使用都是基于 kafka 0.8
有哥们报告 0.9 下会有点问题[1],我暂时还没有时间深入跟进



--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty...@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+...@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

黄川

unread,
Mar 3, 2016, 2:50:51 PM3/3/16
to openresty
好,我来prototype下,多谢Doujiang!

wd

unread,
Mar 17, 2016, 7:29:26 AM3/17/16
to open...@googlegroups.com, openresty-en
用上了,很不错。有个 typo

local function _metadata_cache(self, topic)
if not topic then
return self.brokers, self.topic_partitions
end
local partitions = self.topic_partitions[topic]
if partitions and partitions.num and partitions.num > 0 then
return self.brokers, partitions
end
return nil, "not foundd topic"
end

那个 foundd 

On Fri, Dec 12, 2014 at 1:53 AM, DeJiang Zhu <douji...@gmail.com> wrote:
I'd like to announce the first release of the simple kafka driver.

Only producer has be implemented now, any feedback are welcome :)

--

DeJiang Zhu

unread,
Mar 18, 2016, 2:46:53 AM3/18/16
to open...@googlegroups.com
Hello,

2016-03-17 19:29 GMT+08:00 wd <w...@wdicc.com>:
用上了,很不错。

目前还有一个需要完善的点,发往 kafka 的速度不够快:
因为同一个 partition 上的数据,需要保持有序,所以,同一 partition 上的数据,不能并发发送
另外,为了实现上的简单,所以 master 版本没有并发发送

所以,如果你有万兆网卡的话,应该是跑不满的了,在我的测试里,500 Mbit/s 是没问题的 (24 worker)
 
有个 typo


哈哈,这个也有一点点故意的意思,因为还有一个 api 会返回这个错误,用来做点小区分

wd

unread,
Mar 18, 2016, 6:06:22 AM3/18/16
to open...@googlegroups.com
2016-03-18 14:46 GMT+08:00 DeJiang Zhu <douji...@gmail.com>:
Hello,

2016-03-17 19:29 GMT+08:00 wd <w...@wdicc.com>:
用上了,很不错。

目前还有一个需要完善的点,发往 kafka 的速度不够快:
因为同一个 partition 上的数据,需要保持有序,所以,同一 partition 上的数据,不能并发发送
另外,为了实现上的简单,所以 master 版本没有并发发送

所以,如果你有万兆网卡的话,应该是跑不满的了,在我的测试里,500 Mbit/s 是没问题的 (24 worker)

我目前没那么大量,所以这个不是问题。测试了单个 broker 的起停,都不会影响,挺不错的。

wd

unread,
Mar 18, 2016, 6:09:02 AM3/18/16
to open...@googlegroups.com

哦对了,我遇到了一个问题是 kafka 那边配置 broker 的 name 是机器名,类似于 abc.x.y 这种,内网里面 hosts 文件有设置 search domain,所以类似请求的时候会自动加上 abc.x.y.domain.com,但是这个模块的 socket 模块不会处理 hosts 文件,所以这种就会请求 broker 失败。后来修改 broker 的 name 为 ip 就好了。希望对大家有用。

kane york

unread,
May 9, 2016, 10:13:07 AM5/9/16
to openresty
多谢尝鲜!
Reply all
Reply to author
Forward
0 new messages