kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Beabes <mailinglist...@gmail.com>
Subject Re: Kafka Streams: Creating Serde in Scala for application specific object
Date Tue, 01 Dec 2020 23:40:18 GMT
Don't worry about this one. Figured it out. Created a Serde for MyAppObject
& implemented my own Serializer & Deserializer classes.

object MyAppObjectSerde extends Serde[MyAppObject] {

  override def serializer(): Serializer[MyAppObject] = new MyAppObjectSerializer

  override def deserializer(): Deserializer[MyAppObject] = new
MyAppObjectDeserializer

}


On Tue, Dec 1, 2020 at 1:33 PM Eric Beabes <mailinglists19@gmail.com> wrote:

> I am grouping messages as follows:
>
> .groupBy((_, myAppObject) => myAppObject.getId)(Grouped.`with`[String, MyAppObject])
>
>
> I am getting a message saying.. "No implicits found for parameter valueSerde: Serde[MyAppObject]
>
>
> My understanding is I need to add an implicit like this...
>
>
> implicit val *mySerde*:Serde[MyAppObject] = Serdes.fromFn(...)
>
>
> But I don't know how to create a Serde for MyAppObject. Am I supposed to use 'fromFn'?
I couldn't find any examples. Any tips would be greatly appreciated!
>
>
> Thanks.
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message