Shopify/sarama — pull request #114 by schleppy (2014-06-26 21:36:13+00:00)
Title: Add two new channels to the Producer for handling acknowledgments from

Kafka and to retrieve messages that failed for possible replay.

ReturnFailedMessages in the config will trigger any messages that were not
successfully sent / acked to be sent on the failed channel as []byte.
The application using this package is responsible for reading from the
failed channel, retrieved via the Failed() function on the Producer If
ReturnFailedMessages is true, then the application must consume the
Failed() channel or it will eventually block.

ReturnAckCounts in the config will trigger ack counts per partition, per
topic to be sent on the acked channel after each flush.
The application using this package is responsible for reading from the
acked channel, retrieved via the Acked() function on the Producer If
ReturnFailedMessages is true, then the application must consume the
Acked() channel or it will eventually block.

This commit also includes a change for the error sent in the
DroppedMessagesError struct to the errorCb to be the block error instead
of the error returned from Produce.