Skip to content

Commit

Permalink
minor adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermg committed Jan 16, 2020
1 parent 5422172 commit 99cd00e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/cljc/broker/simple.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@
(clj-brokee.consumer/subscribe c1 #{:t1} #(println "T1" %1 %2))
(clj-brokee.consumer/subscribe c2 #{:t2 :t3} #(println "T2/3" %1 %2))
(clj-brokee.producer/produce p1 :t1 {:foo "bar1"})
(Thread/sleep 100)
(clj-brokee.producer/produce p1 :t2 {:foo "bar2"})
(clj-brokee.producer/produce p1 :t3 {:foo "bar3"}))
(Thread/sleep 100)
(clj-brokee.producer/produce p2 :t3 {:foo "bar3"}))
3 changes: 2 additions & 1 deletion src/cljc/producer/simple.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
(produce [this topic message]
(doseq [consumer (some-> broker :consumers deref)]
(doseq [handle-fn (some-> consumer :subscriptions deref (get topic))]
(u/run-async handle-fn topic message)))))
(u/run-async handle-fn topic message)))
nil))

0 comments on commit 99cd00e

Please sign in to comment.