 (fact
  (def alive (atom true))
  (def received (atom '()))
- (defn my-func
-   {:reg {:kind :fact
-          :name "foo/bar"}}
-   [ev]
+ (defn my-func [ev]
    (swap! received #(conj % ev)))
  (def my-event {:kind :fact
                 :name "foo/bar"

   (di/startup $)
   (di/do-with! $ [serve]
     (serve my-service {:partial :event}) => nil
     (persistent! calls) => [[:declare-service "rabbit-microservices.core-test/my-service" {:partial :event}]
                             [:assign-service "rabbit-microservices.core-test/my-service" my-service]])))


[[:chapter {:title "declare-service: Declare an AMQP Queue" :tag "declare-service"}]]

 (def event2 {:name "foo/baz"
              :key 5555
              :data [1 2 3 4]})
 (defn my-func [ev publish]
   (publish event2))
 (def event-that-was-sent
   (merge my-event event2))
