 ;(publish-work consumer {:producer {:host "localhost" :port 9092} :topic "ping" :partition 0 :offset 0 :len 10})
 ;
 ;
-;(def res (do-work-unit! consumer))
+;(def res (wait-and-do-work-unit! consumer))
 ;
 ;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  (car/wcar redis-conn 
    (car/lpush work-queue work-unit)))


(comment 
  
(use 'kafka-clj.consumer.consumer :reload)
(def consumer (consumer-start {:redis-conf {:host "localhost" :max-active 5 :timeout 1000} :working-queue "working" :complete-queue "complete" :work-queue "work" :conf {}}))
(publish-work consumer {:producer {:host "localhost" :port 9092} :topic "ping" :partition 0 :offset 0 :len 10})
(def res (do-work-unit! consumer (fn [state status resp-data] state)))

)
    

  (:require 
    [taoensso.carmine :as car :refer [wcar]]
    [thread-load.core :as load]
    [clojure.core.async :refer [go alts!! >!! >! <! timeout]]
    [kafka-clj.fetch :refer [create-fetch-producer send-fetch read-fetch]]
    [thread-load.core :as tl]
    [clj-tuple :refer [tuple]]
    [fun-utils.core :refer [go-seq]]
    [clojure.tools.logging :refer [info error]])
