   (:require [com.brainbot.iniconfig :as ini])
   (:require [tika])
   (:import java.io.File)
-  (:import [java.util.concurrent TimeUnit ScheduledThreadPoolExecutor Callable]))
+  (:import [com.rabbitmq.client Address ConnectionFactory Connection Channel ShutdownListener])
+  (:import [java.util.concurrent Executors]))
 
 
 (defn map-from-routing-key-string




(defn doit
  []
  (connect-loop
   {}
   (fn [conn]
     (let [ch (lch/open conn)
           queue-name (initialize-rabbitmq-structures ch "extract_content" "nextbot" "fscrawler:test")
           tag (lcons/subscribe ch queue-name new-handle-msg)]
       (println "tag is" tag)))))

(defn -main [& args]
  (log-config/set-logger!)

  handle-connection with the connection object. if the connection
  fails, wait for 5 seconds and try again"

  [connect handle-connection]
  (while true
    (try
      (let [conn (connect)
            restart-promise (promise)
            sl   (rmq/shutdown-listener
                  (partial deliver restart-promise))]
