jirafe/pykafka — pull request #4 by jackolantern (2013-08-12 16:00:24+00:00)
Title: Handles broker disconnects.

The bug:
When a producer is connected to a broker, and is not transmitting
information, and the connection is interrupted, (for example by a load
balancer rebooting) the producer is not aware of this interruption, and
when asked to send a message to the broker, it will do so without
reconnecting. The broker will then simply discard the message and send
a RST tcp packet, which the producer will ignore.

The fix:
The producer now checks for RST packets, and throws a ConnectionReset
exception when it receives one. This allows the code calling the
producer to handle the exception in a sane manner.