Are you consuming data in kafkaStream with byte[] argument in generics

On Sun, Oct 18, 2015 at 4:20 PM, Kiran Singh <kim.sing...@gmail.com> wrote:

> 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 18, 2015 at 3:48 PM, Pratapi Hemant Patel <
> hemantson...@gmail.com> wrote:
>
> > 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 <%209013982184>
> > On 18-Oct-2015 3:32 pm, "Kiran Singh" <kim.sing...@gmail.com> wrote:
> >
> > > 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
> > >
> >
>

Reply via email to