     (let [error-handler (reify ErrorHandler
                           (onError [this x] 
                             (taoensso.timbre/warn "Aeron messaging publication error:" x)
-                            (taoensso.timbre/warn "Resetting Aeron publication.")
-                            (reset-connection this)))
-
+                            #_(taoensso.timbre/warn "Resetting Aeron publication.")
+                            #_(reset-connection this)))
           conn (Aeron/connect (.errorHandler (Aeron$Context.) error-handler))
           pub (.addPublication conn channel stream-id)]
       (reset! publication pub)


  (write [this buf start end]
    ;; should possibly use core-async offer here and print out message if going to block
    (>!! pending-ch (->Message buf start end)))

  (disconnect [this]
    (.close ^Publication @publication)

(ns onyx.messaging.aeron.publication-manager
  (:require [taoensso.timbre :refer [error fatal info] :as timbre]
            [clojure.core.async :refer [chan >!! <!! close! sliding-buffer thread]])
  (:import [uk.co.real_logic.aeron Aeron Aeron$Context FragmentAssembler Publication Subscription AvailableImageHandler]
           [uk.co.real_logic.agrona ErrorHandler CloseHelper]
