1. Alvaro Videla
  2. resizer

Source

resizer / src / resizer / core.clj

(ns resizer.core
  (:gen-class)
  (:use [resizer.consumer :as rc]
        [resizer.resizer :as rz]
        [resizer.fabric :as rf]))

(def exchanges [
                {:name "cloudstagram-broadcast-newimage" :type "fanout" :opts {:durable true}}
                {:name "cloudstagram-new-image" :type "direct" :opts {:durable true}}
                {:name "cloudstagram-upload" :type "direct" :opts {:durable true}}
                ])

(defn -main []
  (println "Connecting to Mongodb")
  (rz/mongo-connect)
  (println "Initializing Fabric")
  (rf/init-fabric exchanges)
  (println "Starting RabbitMQ Consumers")
  (rc/start-consumer))