 
 (defn add-failed-check 
   "Check if the message failed to send"
-  [f connection buf]
+  [^ChannelFuture f connection buf]
   (.addListener f (reify GenericFutureListener
                     (operationComplete [_ _]
                       (when-not (.isSuccess f)

  [^ChannelGroup channel-group handler]
  (proxy [ChannelInboundHandlerAdapter] []
    (channelActive [ctx]
      (.add channel-group (.channel ctx)))
    (channelRead [^ChannelHandlerContext ctx ^Object message]
      (try
        (handler ctx message)

           (catch Throwable e
             (timbre/fatal e))))))

(defn established? [^Channel channel]
  (and channel (.isActive channel)))

(defn create-client [client-group host port]
