charithe/kafka-junit

producerConfig() with DefaultEncoder

Closed this issue · 2 comments

It would be nice if there was a quick way to create a producerConfig with the DefaultEncoder as opposed to the StringEncoder. I would use it in zipkin https://github.com/openzipkin/zipkin/pull/476/files

Good point. I just released version 1.4 which has a method called producerConfigWithDefaultEncoder() that creates a producer configuration with the default encoder. There's producerConfigWithStringEncoder() for Strings and producerConfig(String encoderClassName) for any other custom encoders.

Thanks!