-(ns ^:no-doc onyx.messaging.common)
+(ns ^:no-doc onyx.messaging.common
+  (:require [taoensso.timbre :refer [fatal]]))
 
 (defn my-remote-ip []
   (apply str (butlast (slurp "http://checkip.amazonaws.com"))))


(defmulti messaging-peer-group :onyx.messaging/impl)

(defmethod messaging-require :aeron [_]
  (require 'onyx.messaging.aeron))

(defmethod messenger :aeron [_]
  (ns-resolve 'onyx.messaging.aeron 'aeron))

  (ns-resolve 'onyx.messaging.aeron 'aeron-peer-group))

(defmethod messaging-require :netty-tcp [_]
  (safe-require 'onyx.messaging.netty-tcp))

(defmethod messenger :netty-tcp [_]
  (ns-resolve 'onyx.messaging.netty-tcp 'netty-tcp-sockets))
