1

I noticed confluent has a kafka serializer that will let me serialize and de-serialize my case classes from my kafka topic, and it will pull the schema from the registry.

If this is the case, what benefit would I get by using avro4s?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Blankman
  • 259,732
  • 324
  • 769
  • 1,199

1 Answers1

0

You have no obligation to use avro4s. In fact you do not have to use Avro at all. Kafka does not care about the format you use for serialization. Although, Avro is the defacto (de)serializer for Kafka, and the one you noticed within Confluent suit (Schema Registry?), is also Avro. The only thing you need is to add dependency to Avro: https://mvnrepository.com/artifact/org.apache.avro/avro/1.10.1

Also, use sbt-avro plugin. This one is not necessary, but your life will be very hard without it: https://github.com/sbt/sbt-avro

Captain K
  • 27
  • 3
  • I was to use schema registry with avro. I'm just wondering what avro4s will benefit me really when confluence has a builtin ser/des already that works right? – Blankman Mar 15 '21 at 15:10
  • @Blankman You need to compile the Avro schemas into case-classes first before you would be able to use those serdes – OneCricketeer Nov 24 '21 at 16:52