lua-resty-kafka
lua-resty-kafka copied to clipboard
send result success, in customer not thing
this is my code , the result show: send success, offset: true
but in customer i can't get anything;
location ^~/1 { default_type 'text/html'; access_log off; access_by_lua ' local producer = require "resty.kafka.producer" local broker_list = { { host = "192.168.210.24", port = 6667 }, { host = "192.168.210.25", port = 6667 }, } local producer_config = {producer_type = "async"} local p = producer:new(broker_list , producer_config) local offset, err = p:send("usertrajectory" , nil , "1111111111111111111112222222222" ) if not offset then ngx.say("send err:", err) return end ngx.say("send success, offset: ", offset) return '; }
@doujiang24 I recently have similar problem. I my application, the nginx message send to kafka, but one of my kafka broker failed. Instead of searching for another available broker, the resty just not working and did not show any error logs. My kafka could not receive any message. When the failed kafka working again, things going well. Why is it like this? Do you know what's the issue?