                               :authorized         authorized
                               :metrics            {}
                               :metrics-registry   (get-metrics-registry)
-                              :connections        (atom {})
-                              :uri-map            (atom {})}
+                              :connections        (atom {} :validator (partial s/validate Connections))
+                              :uri-map            (atom {} :validator (partial s/validate UriMap))}
           metrics            (build-and-register-metrics broker)
           broker             (assoc broker :metrics metrics)
           activemq-consumers (subscribe-to-queues broker accept-consumers delivery-consumers)

(def Websocket
  "Schema for a websocket session"
  Object)

(def Broker
  {:activemq-broker    Object

            [puppetlabs.puppetdb.mq :as mq]
            [schema.core :as s]
            [slingshot.slingshot :refer [throw+ try+]])
  (:import (clojure.lang IFn Atom)))

(def Connection
  "The state of a websocket in the connections map"
