 (deftest atom-messaging-test
   ;; [:t2 :t1] [:t3 :t1]
   (let [pg (component/start (am/atom-peer-group {}))
-        m-p1 (component/start (assoc (am/atom-messenger) :peer-group pg :peer-id :p1))
-        m-p2 (component/start (assoc (am/atom-messenger) :peer-group pg :peer-id :p2))
-        m-p3 (component/start (assoc (am/atom-messenger) :peer-group pg :peer-id :p3))
+        m-p1 (component/start (-> (am/atom-messenger)
+                                  (assoc :peer {:peer-group {:messaging-group pg}
+                                                :id :p1})))
+        m-p2 (component/start (-> (am/atom-messenger)
+                                  (assoc :peer {:peer-group {:messaging-group pg}
+                                                :id :p2})))
+        m-p3 (component/start (-> (am/atom-messenger)
+                                  (assoc :peer {:peer-group {:messaging-group pg}
+                                                :id :p3})))
         t1-queue-p1 {:src-peer-id :p1 :dst-task-id :t1}
         t1-queue-p2 {:src-peer-id :p2 :dst-task-id :t1}
         t2-ack-queue {:src-peer-id :p3 :dst-task-id :t1}

              (m/next-epoch)
              (m/emit-barrier)
              (m/send-messages [:m5 :m6] [t1-queue-p2])) 


        messages (remove nil? (mapcat (fn [_] (m/receive-messages m-p3)) (range 20)))]
    (is (= [:m1 :m3 :m2 :m4] messages))
    (is (m/all-barriers-seen? m))


    (let [mnext (-> m-p3
                    (m/ack-barrier)
                    (m/next-epoch))
          messages2 (map :message (mapcat (fn [_] (m/receive-messages m-p3)) (range 20)))]
      (is (= [:m5 :m6] messages2))
      (is (not (m/all-barriers-seen? mnext)))
      (let [m-p1-acks (m/receive-acks m-p1)
