             [onyx.monitoring.measurements :refer [measure-latency]]
             [onyx.compression.nippy :refer [compress decompress]]
             [onyx.log.commands.peer-replica-view :refer [peer-site]]
+            [onyx.static.uuid :refer [random-uuid]]
             [onyx.peer.operation :refer [kw->fn]]
             [onyx.types :refer [dec-count! inc-count!]]
             [taoensso.timbre :refer [info error debug fatal]])

                                     (read-ledger-entries! client ledger-handle read-ch deserializer-fn last-acked max-id no-recovery? backoff-period)
                                     :finished)]
                          (if-not (= exit :shutdown)
                            (>!! read-ch (t/input (java.util.UUID/randomUUID) :done))))
                        (catch Exception e
                          (fatal e))))]
    {:bookkeeper/read-ch read-ch

  (retry-segment
    [_ event segment-id]
    (when-let [msg (get @pending-messages segment-id)]
      (>!! read-ch (assoc msg :id (random-uuid))))
    (swap! pending-messages dissoc segment-id))

  (pending?
