         section (or (config inisection)
                     (die (str "section " inisection " missing in " iniconfig)))
         fscrawler-section (or (config "fscrawler") {})
-        max-size (Integer. (fscrawler-section "max_size"))
+        options {:max-size (Integer. (fscrawler-section "max_size")),
+                 :amqp-url (get fscrawler-section "amqp_url" "amqp://localhost/%2f")}
         filesystems (trimmed-lines-from-string (section "filesystems"))]
     (when (zero? (count filesystems))
       (die (str "no filesystems defined in section " inisection " in " iniconfig)))

    queue-name))

(defn run-with-connection
  [filesystem]
  (let [conn       (rmq/connect)
        ch         (lch/open conn)
        queue-name (initialize-rabbitmq-structures ch "extract_content" "nextbot" filesystem)]

    ;; (lq/declare ch queue-name :exclusive false :auto-delete true)
    ;; (lq/bind    ch queue-name "nextbot")



(defn handle-command-for-filesystem
  [filesystem options]
  (while true
    (try
      (run-with-connection filesystem options)
      (catch Exception err
        (logging/error "got exception" err)
        (trace/print-stack-trace err)
