      :ack-val ack-val 
      :message message}))
 
-(defn build-messages-msg-buf [allocator messages] 
+(defn build-messages-msg-buf [^ByteBufAllocator allocator messages] 
   (let [compressed-messages (map (fn [msg]
                                    (update-in msg [:message] compress))
                                  messages)


(def completion-payload-length (int (+ completion-msg-length type-header-length)))

(defn build-completion-msg-buf [allocator id] 
  (let [buf ^ByteBuf (.ioBuffer allocator completion-payload-length) #_(byte-buffer completion-payload-length)] 
    (.writeByte buf completion-type-id)
    (write-uuid buf id)


(def ack-payload-length ^int (+ ack-msg-length type-header-length))

(defn build-ack-msg-buf [^ByteBufAllocator allocator id completion-id ack-val] 
  (let [^ByteBuf buf (.ioBuffer allocator ack-payload-length) #_(byte-buffer ack-payload-length)] 
    (.writeByte buf ack-type-id)
    (write-uuid buf id)
