joekiller/jruby-kafka — pull request #3 by pangloss (2014-04-28 01:47:56+00:00)
Title: Simplify and streamline Producer

I haven't measured but I'd expect this to run faster in addition to just being more maintainable.

Despite all of the changes, this does not break the interface at all and the unit tests run unmodified. The only outward difference is that I don't wrap the FailedToSendMessageException with a KafkaError anymore, and if you try to sendMsg before connecting, you now get a descriptive error instead of the previous very odd one.

* Eliminated dynamic class lookups within methods.
* Allow all valid options
* Improve option validation - one exception gives you the summary
* Warn on unknown configuration keys
* Don't import java classes into the global namespace
* Switch to the java producer API with a more JRuby friendly interface to eliminate Scala Vector wrapping.