You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Gaurav Agarwal <ga...@gmail.com> on 2015/02/09 10:28:53 UTC
regarding custom msg
hello
We are sending custom message across producer and consumer. But
getting class cast exception . This is working fine with String
message and string encoder.
But this did not work with custom message , i got class cast
exception. I have a message with couple of String attributes
Re: regarding custom msg
Posted by Gaurav Agarwal <ga...@gmail.com>.
sorry for the late reply
while sending the message i serialize the message and send the same across
on topic . the message
private static class TestMessage implements Serializable{
private String time;
ublic String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
But when i tried to consume message , am unable to consume message across
after these two lines
ConsumerConnector consumerConnector =
Consumer.createJavaConsumerConnector(messageProperties
.getConsumerConfig());
Map<String, List<KafkaStream<byte[], byte[]>>> consumerStreams =
consumerConnector
.createMessageStreams(topicCountMap);
Did not get any exception if use DefaultEncoder
On Mon, Feb 9, 2015 at 3:06 PM, Manikumar Reddy <ku...@nmsworks.co.in>
wrote:
> Can you post the exception stack-trace?
>
> On Mon, Feb 9, 2015 at 2:58 PM, Gaurav Agarwal <ga...@gmail.com>
> wrote:
>
> > hello
> > We are sending custom message across producer and consumer. But
> > getting class cast exception . This is working fine with String
> > message and string encoder.
> > But this did not work with custom message , i got class cast
> > exception. I have a message with couple of String attributes
> >
>
Re: regarding custom msg
Posted by Manikumar Reddy <ku...@nmsworks.co.in>.
Can you post the exception stack-trace?
On Mon, Feb 9, 2015 at 2:58 PM, Gaurav Agarwal <ga...@gmail.com>
wrote:
> hello
> We are sending custom message across producer and consumer. But
> getting class cast exception . This is working fine with String
> message and string encoder.
> But this did not work with custom message , i got class cast
> exception. I have a message with couple of String attributes
>