This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-02
Channels
- # aleph (3)
- # announcements (2)
- # babashka (4)
- # beginners (74)
- # calva (21)
- # clj-kondo (30)
- # cljs-dev (7)
- # cljsrn (42)
- # clojure (121)
- # clojure-dev (13)
- # clojure-europe (23)
- # clojure-losangeles (2)
- # clojure-nl (2)
- # clojure-norway (7)
- # clojure-spec (140)
- # clojure-uk (58)
- # clojuredesign-podcast (9)
- # clojurescript (49)
- # clojutre (2)
- # cursive (32)
- # datascript (2)
- # datomic (59)
- # duct (7)
- # figwheel-main (6)
- # fulcro (18)
- # graphql (5)
- # jackdaw (1)
- # joker (6)
- # juxt (7)
- # leiningen (9)
- # off-topic (1)
- # pedestal (14)
- # quil (2)
- # re-frame (3)
- # reitit (8)
- # shadow-cljs (78)
- # sql (8)
- # timbre (3)
- # vim (69)
I think I understand what you mean. You'd like to do something like...
(defn foo
[builder dispatch-fn]
(-> (k/stream builder foo)
(k/map transform-foo)
(k/filter foo-valid?)
(k/process! (partial dispatch-processor dispatch-fn))))
...but in order for your dispatch processor to work, you'd need to (.addSink sink-id processor-id key-serializer value-serializer processor-id)
for each sink you want to write to in your dispatch-processor, and the processor-id assigned by the DSL is pseudo-random, making it difficult to add a sink with the correct "parent processor".
I think the solution is to use .addProcessor
rather than k/process!
. This allows you to assign a name to the processor.