chore(error-log-logger): add kafka meta_refresh_interval#8821
Conversation
| | kafka.required_acks | integer | False | 1 | [0, 1, -1] | Number of acknowledgements the leader needs to receive for the producer to consider the request complete. This controls the durability of the sent records. The attribute follows the same configuration as the Kafka `acks` attribute. See [Apache Kafka documentation](https://kafka.apache.org/documentation/#producerconfigs_acks) for more. | | ||
| | kafka.key | string | False | | | Key used for allocating partitions for messages. | | ||
| | kafka.cluster_name | integer | False | 1 | [0,...] | Name of the cluster. Used when there are two or more Kafka clusters. Only works if the `producer_type` attribute is set to `async`. | | ||
| | kafka.meta_refresh_interval | integer | optional | 30 | [1,...] | `refresh_interval` parameter in [lua-resty-kafka](https://github.com/doujiang24/lua-resty-kafka) specifies the time to auto refresh the metadata, in seconds.| |
There was a problem hiding this comment.
| | kafka.meta_refresh_interval | integer | optional | 30 | [1,...] | `refresh_interval` parameter in [lua-resty-kafka](https://github.com/doujiang24/lua-resty-kafka) specifies the time to auto refresh the metadata, in seconds.| | |
| | kafka.meta_refresh_interval | integer | False | 30 | [1,...] | `refresh_interval` parameter in [lua-resty-kafka](https://github.com/doujiang24/lua-resty-kafka) specifies the time to auto refresh the metadata, in seconds.| |
There was a problem hiding this comment.
it seems in this disscussion #8762 (comment), the value is optional?
There was a problem hiding this comment.
Let's keep with the same style in this docs.
If we need to change the value from True/False to optional, let's update all of them.
There was a problem hiding this comment.
Let's keep with the same style in this docs.
i will change it later.
| }], | ||
| "kafka_topic": "test2" | ||
| "kafka_topic": "test2", | ||
| "meta_refresh_interval": 1 |
There was a problem hiding this comment.
Can we add a mock test to ensure this config is passed to broker_config?
There was a problem hiding this comment.
@spacewander Can we check by the following steps:
- log the
broker_configinfo insend_to_kafkafunction - check if the error log include
"refresh_interval":1000or not?
There was a problem hiding this comment.
We can verify it without adding any code to the plugin.
Line 373 in 0bc65ea
Like this, we can inject some code while creating the producer.
There was a problem hiding this comment.
ok, i see. But func create_producer is a local func, how can we inject it by extra_init_by_lua?
There was a problem hiding this comment.
We can inject
apisix/apisix/plugins/error-log-logger.lua
Line 351 in 0bc65ea
There was a problem hiding this comment.
@spacewander updated, please take a look, thanks.
Signed-off-by: ashing <[email protected]>
* upstream/master: fix: limit count plugin conf parameter undefined error (apache#8902) chore: remove duplicate kubernetes test case (apache#8882) feat: add 'range_id' algorithm for 'request-id' plugin (apache#8790) chore(error-log-logger): add kafka meta_refresh_interval (apache#8821) chore(deps): bump golang.org/x/net from 0.2.0 to 0.7.0 in /t/grpc_server_example (apache#8881) docs: Update getting-started.md (apache#8763) fix(admin): fix wrong http code for patch method (apache#8855) feat: stream subsystem support tars service discovery (apache#8826) feat(ci): implement image caching to reduce ci build time. (apache#8735) feat(admin): add head method support to /apisix/admin (apache#8752) feat: opentelemetry plugin config collector.address support specify https scheme (apache#8823) fix: add admin schema to control_plane config (apache#8809)
Description
Fixes # (issue)
Inspired by PR: #8762
Checklist