apache/kafka — pull request #7 by hiloboy0119 (2013-07-25 19:03:46+00:00)
Title: Modified the async producer so it re-queues failed batches.  

I'm working on an application that needs the throughput offered by an async producer but also needs to handle send failures gracefully like a sync producer. I modified the ProducerSendThread so it will re-queue failed batches. This allowed me to determine the behavior I wanted from my producer with the queue config parameters.

A "queue.enqueue.timeout.ms=0" allowed me to get runtime exceptions when sends failed often enough to fill the queue. This also allowed me to use "queue.buffering.max.messages" to control how tolerant the application is to network blips.