   ;; indicator that the unknown message may be complete.
   (let [{:keys [path registry metrics]} dlo
         digest (digest/sha1 [bytes])
-        metadata (metadata-str received "unknown" 0 digest)
+        metadata (q/metadata-str received "unknown" 0 digest)
         cmd-dest (.resolve path (str id \- metadata))]
     (Files/write cmd-dest bytes (oopts []))
     (let [info-dest (store-failed-command-info id metadata "unknown"

  [cmdref stockpile dlo]
  (let [{:keys [path registry metrics]} dlo
        {:keys [command received attempts]} cmdref
        entry (cmdref->entry cmdref)
        cmd-dest (.resolve path (entry-cmd-data-filename entry))]
    ;; We're going to assume that our moves will be atomic, and if
    ;; they're not, that we don't care about the possibility of

   [puppetlabs.i18n.core :refer [trs]]
   [puppetlabs.kitchensink.core :refer [timestamp]]
   [puppetlabs.puppetdb.nio :refer [copts copt-atomic copt-replace oopts]]
   [puppetlabs.puppetdb.queue :as q]
   [puppetlabs.stockpile.queue :as stock])
  (:import
   [java.nio.file AtomicMoveNotSupportedException
