           (>!! outbox-ch entry)
 
           (let [outbox-loop-ch (thread (outbox-loop id log outbox-ch restart-ch))
-                processing-loop-ch (thread (processing-loop id log messenger origin inbox-ch outbox-ch restart-ch kill-ch opts monitoring task-component-fn))]
+                processing-loop-ch (thread (processing-loop id log peer-group origin inbox-ch outbox-ch restart-ch kill-ch opts monitoring task-component-fn))]
             (assoc component
                    :outbox-loop-ch outbox-loop-ch
                    :processing-loop-ch processing-loop-ch

            (when (:lifecycle state)
              (component/stop @(:lifecycle state)))
            :else
            (let [new-replica (extensions/apply-log-entry entry replica)
                  diff (extensions/replica-diff entry replica new-replica)
                  reactions (extensions/reactions entry replica new-replica diff state)
                  new-state (extensions/fire-side-effects! entry replica new-replica diff state)
                  new-task-state (extensions/new-task-state! log entry replica new-replica diff new-state task-state opts)
                  annotated-reactions (mapv (partial annotate-reaction entry id) reactions)]
              (reset! replica-atom new-replica)
              (reset! task-state-atom new-task-state)
              (recur (send-to-outbox! new-state annotated-reactions))))))
      (catch Throwable e
        (taoensso.timbre/error e (format "Peer %s: error in processing loop. Restarting." id))
        (close! restart-ch))
      (finally
        (stop-task-state @task-state-atom)
        ;; call peer replica view side effects shutdown stuff here
        (taoensso.timbre/info (format "Peer %s: finished of processing loop" id))))))


              outbox-ch (chan (arg-or-default :onyx.peer/outbox-capacity opts))
              kill-ch (chan (dropping-buffer 1))
              restart-ch (chan 1)
              peer-site (m/peer-site (:messaging-group peer-group) id)
              entry (create-log-entry :prepare-join-cluster {:joiner id :peer-site peer-site
                                                             :tags (or (:onyx.peer/tags opts) [])})
              origin (extensions/subscribe-to-log log inbox-ch)]
