Clarification about Custom Encoder/Decoder for serialization

2014-10-09 Thread Abraham Jacob
Hi All, I wanted to get some clarification on Kafka's Encoder/Decoder usage. Lets say I want to implement a custom Encoder. public class CustomMessageSerializer implements EncoderMyCustomObject { @Override public byte[] toBytes(String arg0) { // serialize the MyCustomObject return

Re: Clarification about Custom Encoder/Decoder for serialization

2014-10-09 Thread Jun Rao
The encoder is instantiated once when the producer is constructed. Thanks, Jun On Thu, Oct 9, 2014 at 6:45 PM, Abraham Jacob abe.jac...@gmail.com wrote: Hi All, I wanted to get some clarification on Kafka's Encoder/Decoder usage. Lets say I want to implement a custom Encoder. public