doujiang24 / lua-resty-kafka

Lua kafka client driver for the Openresty based on the cosocket API
BSD 3-Clause "New" or "Revised" License
802 stars 275 forks source link

nginx restart, reload, stop start会丢失数据吗? #92

Closed sugue closed 4 years ago

sugue commented 4 years ago

代码是通过定时器把消息定时发送的, 在做restart, reload, stop start三种操作的时候, 会不会定时器没来的及启动, 然后没有发送出去的buf就丢失了?

doujiang24 commented 4 years ago

-HUP-QUIT 这种优雅退出是没问题的,普通的 kill,尤其是 kill -9 这种,系统不会给应用程序善后处理机会的

这个问题建议去 OpenResty 官方论坛讨论:https://forum.openresty.us/