         java.lang.Exception
         (fn [e & _] (.printStackTrace e)))
 
+      (dire/with-handler! #'ack-loop
+        java.lang.Exception
+        (fn [e & args] (.printStackTrace e)))
+
       (dire/with-handler! #'commit-tx-loop
         java.lang.Exception
         (fn [e & _] (.printStackTrace e)))
-
-      (dire/with-handler! #'ack-loop
-        java.lang.Exception
-        (fn [e & args] (.printStackTrace e)))
 
       (dire/with-handler! #'close-resources-loop
         java.lang.Exception

        :apply-fn-loop (thread (apply-fn-loop apply-fn-ch compress-batch-ch))
        :compress-batch-loop (thread (compress-batch-loop compress-batch-ch write-batch-ch))
        :write-batch-loop (thread (write-batch-loop write-batch-ch status-check-ch))
        :status-check-loop (thread (status-check-loop status-check-ch commit-tx-ch reset-payload-node-ch))
        :commit-tx-loop (thread (commit-tx-loop commit-tx-ch ack-ch))
        :ack-loop (thread (ack-loop ack-ch close-resources-ch))
        :close-resources-loop (thread (close-resources-loop close-resources-ch complete-task-ch))
        :complete-task-loop (thread (complete-task-loop complete-task-ch reset-payload-node-ch))
        :reset-payload-node (thread (reset-payload-node reset-payload-node-ch)))))

    (close! (:compress-batch-ch component))
    (close! (:write-batch-ch component))
    (close! (:status-check-ch component))
    (close! (:ack-ch component))
    (close! (:commit-tx-ch component))
    (close! (:close-resources-ch component))
    (close! (:complete-task-ch component))
    (close! (:reset-payload-node-ch component))
