doujiang24 / lua-resty-kafka

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

有没有办法在body_filter或者log阶段使用kafka? #163

Open ZxyNull0 opened 2 months ago

ZxyNull0 commented 2 months ago
2024/04/08 09:41:12 [error] 2892575#0: *1 failed to run body_filter_by_lua*: /usr/local/openresty/lualib/resty/kafka/broker.lua:125: API disabled in the context of body_filter_by_lua*
stack traceback:
    [C]: in function 'tcp'
    /usr/local/openresty/lualib/resty/kafka/broker.lua:125: in function 'send_receive'
    /usr/local/openresty/lualib/resty/kafka/client.lua:183: in function '_fetch_metadata'
    /usr/local/openresty/lualib/resty/kafka/client.lua:266: in function 'fetch_metadata'
    /usr/local/openresty/lualib/resty/kafka/producer.lua:123: in function 'choose_partition'
    /usr/local/openresty/lualib/resty/kafka/producer.lua:379: in function 'send'