Hello

I am sending message from producer like this with DefaultEncoder.

KeyedMessage<String, byte[]> keyedMessage = new KeyedMessage<String,
byte[]>("topic",Serializations.serialize("s"),

                Serializations.getSerialized(msg,rqst));

This is a compile time error at java level as it expects String


But if i use


KeyedMessage<String, byte[]> keyedMessage = new KeyedMessage<String,
byte[]>("topic","s",Serializations.getSerialized(msg,rqst));


as part of sending message , it gives me class cast exception as i have
configured DefaultEncoder and sending byte Message.

Reply via email to