Skip to content

Commit

Permalink
fix: remove 0 from required_acks allowed values for kafka-logger (#10469
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kayx23 authored Nov 11, 2023
1 parent 2696bc5 commit e1503dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
2 changes: 1 addition & 1 deletion apisix/plugins/kafka-logger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ local schema = {
required_acks = {
type = "integer",
default = 1,
enum = { 0, 1, -1 },
enum = { 1, -1 },
},
key = {type = "string"},
timeout = {type = "integer", minimum = 1, default = 3},
Expand Down
26 changes: 1 addition & 25 deletions t/plugin/kafka-logger2.t
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ done
=== TEST 2: report log to kafka, with required_acks(1, 0, -1)
=== TEST 2: report log to kafka, with required_acks(1, -1)
--- config
location /t {
content_by_lua_block {
Expand Down Expand Up @@ -110,30 +110,6 @@ location /t {
uri = "/hello",
},
},
{
input = {
plugins = {
["kafka-logger"] = {
broker_list = {
["127.0.0.1"] = 9092
},
kafka_topic = "test2",
producer_type = "sync",
timeout = 1,
batch_max_size = 1,
required_acks = 0,
meta_format = "origin",
}
},
upstream = {
nodes = {
["127.0.0.1:1980"] = 1
},
type = "roundrobin"
},
uri = "/hello",
},
},
}
local t = require("lib.test_admin").test
Expand Down

0 comments on commit e1503dc

Please sign in to comment.