                             (close! in-chan)
                             (close! out-chan)))))))
 
-(defn handle-request
+(defn- handle-request
   [msgs db-ent type project]
   (fn [{:keys [headers] :as req}]
     (cond

       (apply str)
       parse-string))

(defn kafka-stream
  [zk type project]
  (let [conf (kafka-config zk) 
        topic (str "events_" type "_" project)

  [config [type project]]
  (let [msgs (kafka-stream (:zookeeper config) type project)
        db-ent (ent config type project)]
    (GET (str "/" type "/" project) [:as req] (handle-request msgs db-ent type project))))
