 
                    (= ch retry-ch)
                    (->> (p-ext/retry-segment pipeline event v)
-                        (call-with-lifecycle-handler
-                          event
-                          :lifecycle/after-retry-segment
-                          (:onyx.core/compiled-handle-exception-fn event)
-                          compiled-after-retry-segment-fn
-                          event
-                          v))
+                        (lc/invoke-after-retry event compiled-after-retry-segment-fn v))
 
                    (= ch seal-ch)
                    (do

                (when (p-ext/pending? pipeline event m)
                  (taoensso.timbre/trace (format "Input retry message %s" m))
                  (->> (p-ext/retry-segment pipeline event m)
                       (call-with-lifecycle-handler
                        event
                        :lifecycle/after-retry-segment
                        (:onyx.core/compiled-handle-exception-fn event)
                        compiled-after-retry-segment-fn
                        event
                        m))))
              (swap! (:onyx.core/state event) update :timeout-pool rsc/expire-bucket)
              (recur))))))))


           (when v
             (cond (= ch release-ch)
                   (->> (p-ext/ack-segment pipeline event v)
                        (lc/invoke-after-ack event compiled-after-ack-segment-fn v))

                   (= ch completion-ch)
                   (let [{:keys [id peer-id]} v
