Mar1usSo opened a new issue, #10073:
URL: https://github.com/apache/apisix/issues/10073

   ### Current Behavior
   
   If we set `"required_acks": 0` in kafka-logger configuration,it will 
   When the plugin `kafka-logger` is used, and set `"required_acks": 0` in 
kafka-logger configuration,however, there is no problem when we set 
`"required_acks": 1` 
   
   Found this issue maybe related to 
https://github.com/doujiang24/lua-resty-kafka/issues/105
   
   https://github.com/doujiang24/lua-resty-kafka#methods-1
   > required_acks
   Specifies the request.required.acks, **SHOULD NOT be zero**. Default 1.
   
   Suggest that apisix correct the corresponding document
   
   ### Expected Behavior
   
   It's no error occur in error.log
   
   ### Error Logs
   
   2023/08/22 18:01:03 [error] 26218#26218: *277287758 [lua] producer.lua:268: 
buffered messages send to kafka err: timeout, retryable: nil, topic: 
ljc-kafkalogger-test, partition_id: 2, length: 2, context: ngx.timer, client: 
10.xx.131.208, server: 0.0.0.0:80
   
   ### Steps to Reproduce
   
   Enable kafka-logger and set `"required_acks": 0` 
   curl http://10.xx.182.157:80/apisix/admin/global_rules/002 \
   -X PUT -H 'Content-Type: application/json' \
   -H "X-API-KEY: xxx" \
   -d '{
       "plugins": {
           "kafka-logger": {
               "broker_list": {
                   "10.xx.176.233":9092,
                   "10.xx.177.140":9092,
                   "10.xx.179.107":9092
               },
               "kafka_topic": "ljc-kafkalogger-test",
               "producer_type": "async",
               "batch_max_size": 1000,
               "timeout": 3,
               "required_acks": 0
           }
       }
   }'
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.13.1
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to