     (throw (ex-info "Read log tasks must set :onyx/max-peers 1" task-map)))
   (when-not (:bookkeeper/password-bytes task-map)
     (throw (Exception. ":bookkeeper/password-bytes must be supplied")))
+
+  (info "Inject read ledger resources:" (:onyx.core/task event))
 
   (let [{:keys [bookkeeper/ledger-start-id bookkeeper/ledger-end-id bookkeeper/zookeeper-ledgers-root-path
                 bookkeeper/zookeeper-addr bookkeeper/deserializer-fn bookkeeper/no-recovery?] :as defaulted-task-map} 

        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))
        error (atom nil)
        commit-ch (chan (sliding-buffer 1))
        shutdown-ch (chan 1)

          batch (if (zero? max-segments) 
                      (<!! timeout-ch)
                      (->> (range max-segments)
                           (keep (fn [_] (first (alts!! [retry-ch read-ch timeout-ch] :priority true))))))]
      (doseq [m batch]
        (let [message (:message m)]
          (trace "Read message in batch" task-id message)
          (when-not (= message :done)
            (swap! top-index max (:entry-id message))
            (swap! pending-indexes conj (:entry-id message))))
