Liking cljdoc? Tell your friends :D

hara.platform.exchange.common


*default-binding-options*clj


*default-exchange-options*clj


*default-queue-options*clj


install-bindingsclj

(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?]}}})
raw docstring

install-consumersclj

(install-consumers {:keys [consumers] :as mq})
(install-consumers mq consumers)

installs-consumers on the queues

installs-consumers on the queues
raw docstring

install-routingclj

(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
raw docstring

lengthen-topologyclj

(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?]}}}})
raw docstring

purge-routingclj

(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 {}}
raw docstring

remove-routingclj

(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 {}}
raw docstring

routingclj

(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 {}}
raw docstring

shorten-topologyclj

(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
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close