(install-bindings mq bindings)
installs bindings on the mq (-> (atom {}) (exchange/-add-queue "q1" {}) (exchange/-add-exchange "ex1" {}) (install-bindings {"ex1" {:queues {"q1" [{}]}}}) (exchange/-list-bindings)) => (contains-in {"ex1" {:queues {"q1" [map?]}}})
installs bindings on the mq (-> (atom {}) (exchange/-add-queue "q1" {}) (exchange/-add-exchange "ex1" {}) (install-bindings {"ex1" {:queues {"q1" [{}]}}}) (exchange/-list-bindings)) => (contains-in {"ex1" {:queues {"q1" [map?]}}})
(install-consumers {:keys [consumers] :as mq})
(install-consumers mq consumers)
installs-consumers on the queues
installs-consumers on the queues
(install-routing {:keys [routing] :as mq})
(install-routing mq routing)
installs routing on the mq (-> (atom {}) (install-routing routes) (routing {:short true})) => routes
installs routing on the mq (-> (atom {}) (install-routing routes) (routing {:short true})) => routes
(lengthen-topology topology)
display routes in full
(lengthen-topology {:queues #{"q1" "q2"}, :exchanges #{"ex1" "ex2"}, :bindings {"ex1" {:exchanges #{"ex2"}, :queues #{"q1"}} "ex2" {:exchanges #{} :queues #{"q2"}}}}) => (contains-in {:queues {"q1" map? "q2" map?}, :exchanges {"ex1" map? "ex2" map?}, :bindings {"ex1" {:exchanges {"ex2" [map?]}, :queues {"q1" [map?]}}, "ex2" {:exchanges {}, :queues {"q2" [map?]}}}})
display routes in full (lengthen-topology {:queues #{"q1" "q2"}, :exchanges #{"ex1" "ex2"}, :bindings {"ex1" {:exchanges #{"ex2"}, :queues #{"q1"}} "ex2" {:exchanges #{} :queues #{"q2"}}}}) => (contains-in {:queues {"q1" map? "q2" map?}, :exchanges {"ex1" map? "ex2" map?}, :bindings {"ex1" {:exchanges {"ex2" [map?]}, :queues {"q1" [map?]}}, "ex2" {:exchanges {}, :queues {"q2" [map?]}}}})
(purge-routing mq)
clears all routing on the mq
(-> (exchange/-create {:type :mock :routing routes}) (component/start) (purge-routing) (routing {:short true})) => {:queues #{}, :exchanges #{}, :bindings {}}
clears all routing on the mq (-> (exchange/-create {:type :mock :routing routes}) (component/start) (purge-routing) (routing {:short true})) => {:queues #{}, :exchanges #{}, :bindings {}}
(remove-routing {:keys [routing] :as mq})
(remove-routing mq routing)
removes routing on the mq
(-> (exchange/-create {:type :mock :routing routes}) (component/start) (exchange/-add-queue "q3" {}) (remove-routing) (routing {:short true})) => {:queues #{"q3"}, :exchanges #{}, :bindings {}}
removes routing on the mq (-> (exchange/-create {:type :mock :routing routes}) (component/start) (exchange/-add-queue "q3" {}) (remove-routing) (routing {:short true})) => {:queues #{"q3"}, :exchanges #{}, :bindings {}}
(routing mq)
(routing mq {:keys [short]})
returns the routes for display
(-> (atom {}) (routing {:short true})) => {:queues #{}, :exchanges #{}, :bindings {}}
returns the routes for display (-> (atom {}) (routing {:short true})) => {:queues #{}, :exchanges #{}, :bindings {}}
(shorten-topology topology)
creates a shorthand version of the routing topology
(shorten-topology (lengthen-topology routes)) => routes
creates a shorthand version of the routing topology (shorten-topology (lengthen-topology routes)) => routes
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close