karthi5634 commented on issue #12201:
URL: https://github.com/apache/apisix/issues/12201#issuecomment-2876421027
Below is my Apisix route:
{
"uri": "/send-json",
"methods": ["POST"],
"name": "kafkaroute",
"plugins": {
"kafka-logger": {
"batch_max_size": 1,
"broker_list": {
"172.18.0.7:19092": 1,
"172.18.0.8:19092": 1,
"172.18.0.9:19092": 1
},
"disable": false,
"kafka_topic": "apisix",
"key": "apisix-key",
"name": "kafka-logger",
"timeout": 60,
"retry_count": 5,
"producer_type": "async",
"include_resp_body": true,
"include_req_body": true,
"log_format": {
"event_id": "event10",
"event_type": "apisix",
"user_id": "user10",
"amount": "$amount"
}
},
"upstream_id": "kafkaupstream"
}
Below is the JSON data sending from API:
{
"event_id": "event10",
"event_type": "apisix",
"user_id": "user10",
"amount": 101.22,
"timestamp": 1712832480000
}
Could you please let me know the log_format syntax for above data. Currenly
I am providing the static values directly but it has pick the data which i send
from API.
Please help.
--
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]