This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-26
Channels
- # architecture (2)
- # beginners (310)
- # boot (34)
- # cider (50)
- # cljs-dev (82)
- # cljsrn (1)
- # clojure (125)
- # clojure-dusseldorf (1)
- # clojure-hamburg (1)
- # clojure-italy (47)
- # clojure-russia (21)
- # clojure-spec (38)
- # clojure-uk (36)
- # clojurescript (200)
- # community-development (21)
- # cursive (10)
- # datomic (15)
- # duct (58)
- # emacs (20)
- # fulcro (10)
- # funcool (1)
- # graphql (2)
- # hoplon (6)
- # jobs (1)
- # lumo (12)
- # mount (20)
- # off-topic (14)
- # om (5)
- # portkey (43)
- # protorepl (2)
- # re-frame (31)
- # reagent (36)
- # ring (17)
- # ring-swagger (6)
- # shadow-cljs (50)
- # spacemacs (9)
- # sql (5)
- # tools-deps (28)
- # uncomplicate (4)
- # unrepl (5)
- # vim (2)
- # yada (2)
Hey all, quick question. I'd like to use mount to start several rabbitmq queues. In doing so I'm using a for
to iterate over the queue names, start the queue, and returns a vector of vectors of [channel conn]
. My issue is that the call to :stop
is returning the following error:
No implementation of method: :close of protocol: #'langohr.core/Closeable
found for class: clojure.lang.PersistentVector
. Is what I'm doing the wrong way to tackle this?And while I'm debugging, I'm unable to clear the defstate, so as a result am unable to iterate because when I start the queues. I'm unable to stop the component
looks like you are passing a vector to your :stop
function that calls (close ..)
on it
(defstate zoom
:start (for [q [:my-queue]]
(let [[ch conn] (rmq/start-queue q)]
(log/info "Starting queue")
(rmq/subscribe-to-queue ch q handler)
[ch conn]))
:stop (let [queues zoom]
(for [[ch conn :as q] queues]
(prn "Stopping queue" )
(rmq/stop-queue ch conn))))
can you do (println "stopping queue. channel:" ch ", connection:" conn)
instead of (prn "Stopping queue" )
?
I can, but each time I "start" the queues. I am unable to stop the queues as stop
throws that error I pasted above. Is there a way to reset
the state?
there is a way to clear the reference, but in this case I would suggest to either:
* restart the repl if possible, since you would not want to leave stale connections around
* introspect #'yourns/zoom
state to figure out how to stop it manually