Hey, is the set of serdes intended to be user-extensible?
because if possible I'd like to be able to use e.g. nippy in some cases.
yes. i’ve extended and used custom nippy serdes before
Is there somewhere I should look at for how to get started? It seems like the existing serdes have kind of magic stuff with the names of their vars, and I don't see docs on how to add in a custom one.
iirc i just copied the edn2 schema ns then swapped out the internal bits from edn to nippy
https://github.com/FundingCircle/jackdaw/blob/master/src/jackdaw/serdes/edn2.clj
you likely don’t need the :prefix or :name fields and can just rely on the defaults clojure provides
Okay, that looks like it's pretty easy, so I guess the only question I have left is does setting the serdes on the topic like in the streams api example work even if you're using a raw consumer?
Oh I see, it's a part of the consumer options map
ya, just give it the classname and you should be good to go
oh. Hmm. Not ideal to have to write a class for that, but okay.
the serdes ns has :gen-class 💪
Seems like the arity 2 of consumer just takes something that subclasses Serdes, which is what's generated by calling the Serdes/serdeFrom on the stuff returned from the fn ns, which would avoid that problem