acrosa / kafka-rb

A simple Producer/Consumer client for Kafka (a distributed publish/subscribe messaging service)
Apache License 2.0
171 stars 43 forks source link

Add force_encoding to avoid errors with messages containing non-ASCII characters. #2

Closed digitalex closed 13 years ago

digitalex commented 13 years ago

Added force_encoding to avoid errors when sending messages containing non-ASCII characters. This would fix issue #1, albeit leaving the encoding decisions to the caller. An alternative would be to send the encoding as part of the message, and correctly decode it when parsing a message. I think it's fine to let the user handle encoding himself.

acrosa commented 13 years ago

Awesome, looks good!