Fork me on GitHub
#jackdaw
<
2020-04-02
>
Darin Douglass15:04:49

what are the maintainers' views on functions that don't directly wrap kafka/kstreams functionality living in the library? i've taken a look through the streams.clj file, it looks like it MAY be an intentionally light wrapper around kstreams. some background: for one of our kstreams apps we have a util function call divert? that'll push off a record if a given predicate is true (i.e. to a failure topic, etc):

(defn divert? [stream pred topic]
  (let [[divert-stream continue-stream] (j/branch stream [pred (constantly true])]
    (j/to divert-stream topic)
    continue-stream)
this abstraction, IMO, would feel really good in the library proper because it provides a useful layer on top of j/branch to handle what i'd think is a common use-case (again, failure topics, etc)

moneyparrot 4
andrea.crotti18:04:12

@ddouglass I don't think we are against abstractions that are not light wrappers around the java API, so that function could be useful, feel free to open a pr if you like

Darin Douglass18:04:53

👌 i'll be working on it and get something up