adding possibility to resend failed messages
separating encode and send functionality
producer detects far end closing connection
fixes in tests
type changes to comments
Merge pull request #6 from chminx/kafka07

Kafka07