Open junchuLF opened 1 year ago
in producer.lua in line 32 i've remove "not"
when it's if self.api_version then version = self.api_version. end
now it take api_version parama from produer init, and using message format with timestamp. not sure of other unctionality in this case
@doujiang24 Hi, I fixed a same issue in #160, but a new version needs to be released.
@junchuLF could you please try the 0.23 release? thanks~
Sorry, but is there any update on this? Timestamp is still -1.
@petruxa77799 Hi, which version is using in your code ?
I have two suggestions here:
"lua-resty-kafka >= 0.23"
local kafka_producer = require "resty.kafka.producer"
local producer_config = {
... ...
api_version = 2,
}
return kafka_producer:new(broker_list, producer_config, cluster_name)
方法2中
local kafka_producer = require "resty.kafka.producer"
local producer_config = {
... ...
api_version = 2,
}
return kafka_producer:new(broker_list, producer_config, cluster_name)
这个代码还是没有解决,我的lua-resty-kafka是0.22的版本 方法1,因为我是apisix的helm方式,不知道怎么升级这个resty.kafka.producer
apisix has already upgrade lua-resty-kafka here Update lua-resty-kafka to 0.23-0, but a new version is needed to be released.
You can ask apisix community to release a new version.
lua_resty_kafka
Version is 0.22 .api_version = 2
The message timestamp received by Kafka is -1