I got same error when I send message to Kafka. generally it caused by
deserializer
as Hemant mentioned.
You need to check how the data was send to Kafka, and how is your consumer
deserializer defined.
And you need to check for both Key and value.
the data is the topic might be byte[] type
Are you consuming data in kafkaStream with byte[] argument in generics
On Sun, Oct 18, 2015 at 4:20 PM, Kiran Singh wrote:
> Hi Pratapi
>
> I am using following serializer property at producer side:
>
> ("serializer.class", "kafka.serializer.StringEncoder");
>
> And at
Hi
I am trying to get message from kafka server using hig level consumer API.
But i am getting following exception
"java.lang.ClassCastException: [B cannot be cast to java.lang.String"
Can anyone explain what this means.
Thanks
Kiran Singh
The problem is with your deserializer. Which deserializer are u using.
It seems you are getting data as a byte array, and in deserializer u r
directly type casting into string.
Best Regards,
Hemant
9810752184 / 9013982184
On 18-Oct-2015 3:32 pm, "Kiran Singh" wrote:
> Hi
Hi Pratapi
I am using following serializer property at producer side:
("serializer.class", "kafka.serializer.StringEncoder");
And at consumer side i am trying to read data in string. And i am getting
this error.
Is there any way to write deserializer at consumer side to string?
On Sun, Oct