This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-26
Channels
- # announcements (7)
- # aws (1)
- # babashka (15)
- # beginners (144)
- # calva (8)
- # chlorine-clover (15)
- # clara (4)
- # clojure (65)
- # clojure-europe (131)
- # clojure-france (1)
- # clojure-nl (6)
- # clojure-nlp (3)
- # clojure-spec (10)
- # clojure-uk (52)
- # clojuredesign-podcast (2)
- # clojurescript (28)
- # cryogen (1)
- # datomic (17)
- # events (2)
- # figwheel-main (2)
- # fulcro (8)
- # hugsql (2)
- # jackdaw (4)
- # jobs (1)
- # leiningen (8)
- # lumo (1)
- # malli (4)
- # off-topic (23)
- # parinfer (3)
- # pathom (3)
- # pedestal (5)
- # re-frame (9)
- # reagent (26)
- # reitit (13)
- # reveal (25)
- # shadow-cljs (45)
- # spacemacs (7)
- # sql (7)
- # tools-deps (40)
- # vrac (2)
- # xtdb (22)
What is the reason for the topic being passed in to the tail position in https://github.com/FundingCircle/jackdaw/blob/master/test/jackdaw/streams_test.clj#L891-L894? I am looking at the arities https://cljdoc.org/d/fundingcircle/jackdaw/0.6.9/api/jackdaw.streams#aggregate for aggregate and I really only understand the first one (aggregate kgrouped initializer-fn adder-fn). Can anyone shed some light for me on what the others do? I am trying to get something like this to work. When I take out the topic in the last position I get garbage for a.
(-> (js/kstream builder topic1)
(js/group-by (fn [[key {:keys [group] :as record}]] group))
(js/aggregate
(constantly (do
(pp/pprint "I AM AT THE START!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
{:size 0}))
(fn [a [key {:keys [size] :as b}]]
(pp/pprint {:a a :b b}) (update a :size + size)))
js/to-kstream
(js/peek (fn [v] (pp/pprint ["peek" v])))
(js/to topic2))
You probably have to specify value-serde so it's parsed correctly.
Try adding a topic-config as last argument. Something like {:topic-name "aggr-table" :value-serde (jackdaw.serdes/edn-serde)})
I figured it might be serde related. I'll investigate further. Thanks!
Also, I read more about Kafka streams in general and I think I now understand the remaining params. They are relevant to if you are using a KStream vs. a KTable.