         batch-size (:onyx/batch-size task-map)
         batch-timeout (or (:onyx/batch-timeout task-map) (:onyx/batch-timeout defaults))
         read-ch (chan (or (:bookkeeper/read-buffer task-map) 1000))
-        retry-ch (chan max-pending)
+        retry-ch (chan (* 2 max-pending))
         error (atom nil)
         commit-ch (chan (sliding-buffer 1))
         shutdown-ch (chan 1)

                 (all-done? batch)
                 (or (not (empty? @pending-messages))
                     (not (empty? batch)))
                 (zero? (count (.buf read-ch))))
        (when-not (:checkpoint/key (:onyx.core/task-map event))
          (>!! commit-ch {:status :complete}))

                          (reset! error e)
                          (fatal e "BookKeeper plugin: error reading."))))]
    {:bookkeeper/read-ch read-ch
     :bookkeeper/retry-ch retry-ch
     :bookkeeper/shutdown-ch shutdown-ch
     :bookkeeper/commit-ch commit-ch
     :bookkeeper/producer-ch producer-ch
