edenhill/librdkafka — pull request #10 by ZhuYouzhi (2013-06-03 06:54:14+00:00)
Title: Producer OOM precaution

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.