     (.close ds))
   context)
 
-(defn- transfer-old-messages! [connection mq-endpoint]
+(defn- transfer-old-messages! [mq-endpoint]
   (let [[pending exists?]
         (try+
          [(mq/queue-size "localhost" "com.puppetlabs.puppetdb.commands") true]

                       job-pool)))
      (assoc context
             :broker broker
             :mq-factory mq-factory
             :mq-connection mq-connection
             :shared-globals globals))))

(defprotocol PuppetDBServer

                      "might be due to KahaDB corruption. Consult the "
                      "PuppetDB troubleshooting guide.")
                     (throw e)))
          globals {:scf-read-db read-db
                   :scf-write-db write-db
                   :catalog-hash-debug-dir catalog-hash-debug-dir}]
      (transfer-old-messages! (conf/mq-endpoint config))

      (when-not disable-update-checking
        (maybe-check-for-updates config read-db))
