Commits

Alvaro Videla  committed 7d46ec6

explicitly declares exchanges on start up

  • Participants
  • Parent commits 67a2ac0

Comments (0)

Files changed (1)

File src/resizer/core.clj

 (ns resizer.core
   (:gen-class)
   (:use [resizer.consumer :as rc]
-        [resizer.resizer :as rz]))
+        [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))