                                  (future (shutdown-on-error
                                            service-id
                                            #(load-from-mq
-                                             mq-addr
+                                             command-mq-connection-string
                                              mq-endpoint
                                              discard-dir
                                              {:db                     write-db

        dlo-compression-threshold                  (get command-processing :dlo-compression-threshold)
        mq-dir                                     (str (file (:vardir global) "mq"))
        discard-dir                                (file mq-dir "discarded")
        globals                                    {:scf-read-db          read-db
                                                    :scf-write-db         write-db
                                                    :command-mq           {:connection-string (add-max-framesize command-processing mq-addr)
                                                                           :endpoint          mq-endpoint}
                                                    :update-server        update-server
                                                    :product-name         product-name


(defn add-max-framesize
  "Add a maxFrameSize to broker url for activemq."
  [max-frame-size url]
  (format "%s&wireFormat.maxFrameSize=%s&marshal=true" url max-frame-size))

(defn start-puppetdb
  [context config service-id add-ring-handler shutdown-on-error]
