         ;; be sure to clear the temp queue on exit
         (.addShutdownHook (Runtime/getRuntime) (Thread. #(close! mq)))
 
-        ;; initial queue population
         (future
-          (println "Populating the queue in the background")
-          (dotimes [n numhosts]
-            (let [h (-> (make-host n)
-                        (assoc :lastrun (rand-lastrun run-interval)))]
-              (>!! mq h)))
-
-          (println "... finished filling the queue, continuing with the simulation."))
+          (populate-queue mq numhosts run-interval
+                          pdb-host
+                          catalogs reports facts))
 
         (let [run-interval-minutes (time/in-minutes run-interval)
               hosts-per-second (/ numhosts (* run-interval-minutes 60))


    (if nummsgs
      (do
        (submit-n-messages hosts nummsgs rand-perc command-send-ch)
        (dotimes [_ threads]
          (>!! command-send-ch :stop))
        (close! command-send-ch))

           :catalog catalog
           :factset factset)))

(defn submit-messages
  "Given a list of host maps, send `num-messages` to each host.  The function
   is recursive to accumulate possible catalog mutations (i.e. changing a previously
   mutated catalog as opposed to different mutations of the same catalog)."
