                                    datoms (seq (drop num-ignored
                                                      (datoms-sequence db task-map)))]
                               (when datoms
-                                (let [success? (>!! ch (assoc (t/input (java.util.UUID/randomUUID)
+                                (let [success? (>!! ch (assoc (t/input (random-uuid)
                                                                        {:datoms (map unroll (take datoms-per-segment datoms))})
                                                               :chunk-index chunk-index))]
                                   (if success?
                                     (recur (inc chunk-index)
                                            (seq (drop datoms-per-segment datoms)))))))
-                            (>!! ch (t/input (java.util.UUID/randomUUID) :done))
+                            (>!! ch (t/input (random-uuid) :done))
                             (catch Exception e
                               (fatal e))))]
 

                                           (recur tx-index next-backoff)))
                                       :shutdown))]
                          (if-not (= exit :shutdown)
                            (>!! read-ch (t/input (java.util.UUID/randomUUID) :done))))
                        (catch Exception e
                          (fatal e))))]


  (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?
