   handle-connection with the connection object. if the connection
   fails, wait for 5 seconds and try again"
 
-  [rmq-settings handle-connection]
+  [connect handle-connection]
   (while true
     (try
-      (let [conn (rmq/connect rmq-settings)
+      (let [conn (connect)
             restart-promise (promise)
             sl   (rmq/shutdown-listener
                   (partial deliver restart-promise))]

  (:require [com.brainbot.iniconfig :as ini])
  (:require [tika])
  (:import java.io.File)
  (:import [java.util.concurrent TimeUnit ScheduledThreadPoolExecutor Callable]))


(defn map-from-routing-key-string

                   (String. payload "UTF-8")
                   delivery-tag
                   content-type
                   type))
  (Thread/sleep 1000)
  (println "done")
  (lb/ack ch delivery-tag))


(defn connect-loop
