This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-03
Channels
- # aleph (1)
- # announcements (9)
- # babashka (3)
- # beginners (200)
- # calva (22)
- # cider (74)
- # clojure (97)
- # clojure-dev (43)
- # clojure-europe (15)
- # clojure-italy (4)
- # clojure-nl (4)
- # clojure-sanfrancisco (2)
- # clojure-uk (103)
- # clojuredesign-podcast (2)
- # clojurescript (45)
- # core-async (5)
- # cursive (13)
- # datomic (42)
- # emacs (20)
- # fulcro (6)
- # graalvm (37)
- # jackdaw (10)
- # leiningen (7)
- # mid-cities-meetup (3)
- # off-topic (2)
- # pathom (1)
- # pedestal (3)
- # re-frame (6)
- # reagent (38)
- # reitit (5)
- # shadow-cljs (117)
- # spacemacs (1)
- # sql (1)
- # tools-deps (17)
- # vim (14)
- # xtdb (18)
Hey do you have an example of the minimal setup to use a caching client for the confluent schema registry with jackdaw ? I am trying to look through the source and the docs but I am a bit confused as I am not super familiar with the the confluent schema registry
to be more precise I don’t really understand why serde
from jackdaw.serdes.avro.confluent
needs a schema as an argument when I thought it would use the schema registry to get it
It needs a schema present in order to write a message. I think you can get away with a nil for the schema when you are using it for a consumer. In this case, the messages include an id that allows the deserializer to fetch the schema from the registry before decoding the message
Hey @U065JNAN8 just a suggestion, what would you think about also having producer-serde
and consumer-serde
functions in the jackdaw.serdes.avro.confluent
namespace so you only provide the arguments what are needed if you don’t use both aspects of the serde ?
eg for the producer you’d only need to provide the avro schema and then for the consumer only needs a schema-registry-client
?
The producer also needs a schema-registry-client because when it produces a message, it "registers" the schema with the registry if it hasn't already been registered.
ah ok thanks, how would you go about pulling the schema in that case, with client
from jackdaw.serdes.avro.schema-registry
?
I tend to have take a copy of the schema and check it into the repo (same way you might check in the current schema arrived at by applying your database migrations)
OK I think I get it now, I didn’t really understand how to use client
- it’s more of an helper to build the java client object and then you call the java methods (eg getById
) on that object, right ?