jackdaw

https://github.com/FundingCircle/jackdaw
tzzh 2020-03-03T13:15:47.009300Z

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

tzzh 2020-03-03T14:21:39.010600Z

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

2020-03-03T15:21:14.015200Z

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

tzzh 2020-03-04T11:16:24.035100Z

Hey @cddr 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 ?

2020-03-06T22:50:30.039700Z

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.

tzzh 2020-03-03T15:58:41.015900Z

ah ok thanks, how would you go about pulling the schema in that case, with client from jackdaw.serdes.avro.schema-registry ?

2020-03-03T16:03:23.018100Z

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)

tzzh 2020-03-03T16:07:28.019600Z

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 ?

2020-03-03T16:10:22.023Z

Yep. You can do. And the thing that might be not obvious if your trying to use the mock registry client is that the producer must share the same (i.e identical object) client as the consumer.

tzzh 2020-03-03T16:12:55.023300Z

OK cool thank you :thumbsup: