-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Producer OOM precaution #10
Conversation
Hi Zhu! Thanks for your contribution. I added a similar setting to the 0.7 branch a couple of weeks ago.
See this commit: Configuration: producer.max_outq_msg_cnt I've merged the 0.7 branch down to master, including this commit. |
Hi, Edenhill. "it lets the application know (by -1 return from rd_kafka_produce() and errno ENOBUFS) that it has dropped the message, allowing the application to take appropriate actions, " is cool. Thanks. There are two little question I'd like to discuss: |
|
Hi, Edenhill. Thanks for you reply |
Fix get/init race for stat counters
Hi, Edenhill.
In current librdkafka, if producer produce data at a rate faster than broker can handle, then data will accumulate in rk->rk_op, will may cause OOM (This does happen in my case).
To prevent this, this patch adds a new parameter max_payload_size, if sum of payload exceeds max_payload_size, comming msgs will be dropped.