Closed elftech closed 7 months ago
- Verify that your producer-reusal code is in fact used and that a new producer is not created for each Produce()
- To break this problem down you'll also need to measure the ingestion rate, i.e., at what rate you are calling Produce(), and measure the latency, per message, between Produce() and the delivery report event.
1.I've added initialization of p_once slice in the code snippet posted to illustrate why only one producer can be used for a specified topic, demonstrating that my producer-reusal code is ok.
Finally, i switched to use sarama https://github.com/Shopify/sarama instead in the producer side and it never fluctuates again. I guess the fluctuation may blame to the buffer strategy of rdkafka but I've no enough time to dive deep into it.
Thanks a lot for your reply and I hope someone could figure out this issue in the future.
Closing this for now - if someone encounters this issue in the latest version again, please reopen this including the latency, per message, between Produce() and the delivery report event.
Description
Producer sends messages to a specified topic with a hightly-fluctuating speed with a cycle of a few mininutes. Any wrong of my way sending messages or my configuration??
How to reproduce
I've record the speed of messaing and show them in monitor tools grafana.
Please neglect the decrease near 16:50 'cause I had decreased the upsteam requests.
And Here's my code for production:
Checklist
Please provide the following information:
v1.4.2
):kafka.ConfigMap{ "bootstrap.servers": GetWholeBrokerList(topic) }