Lua Kafka使用
lua-resty-kafka,Lua kafka client driver for the Openresty based on the cosocket API。需要注意的是,不同于redis和mysql 客户端,kafka客户端并不是自带的,需要自行下载发布到openresty 的lualib目录下:
1 | wget https://github.com/doujiang24/lua-resty-kafka/archive/master.zip |
当max_buffering参数设置过大时,出现table overflow
1 | module.kafka_producer_conf = { |
1 | [error] 7692#0: *8828748 lua entry thread aborted: runtime error: table overflow |
将 max_buffering调小即可