You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Define the datatype that you would like to send/receive over Kafka via the JSON + JSON Schema format. You do this by defining your datatype and providing a `Pickler` instance for it.
27
+
The `Pickler` instance comes from the Tapir library.
28
+
29
+
```scala
30
+
importsttp.tapir.Schema.annotations.*
31
+
importsttp.tapir.json.pickler.*
32
+
33
+
finalcaseclassBook(
34
+
@description("name of the book") name: String,
35
+
@description("international standard book number") isbn: Int
36
+
)
37
+
objectBook:
38
+
givenPickler[Book] =Pickler.derived
39
+
```
40
+
41
+
Next, you can create a fs2 Kafka `Serializer` and `Deserializer` for this datatype and use it when building your FS2 Kafka producer/consumer.
0 commit comments