 ;
 
 (defn send
+  "Send the given `key` (optional) and `value` to the given `topic` using
+  the given `producer` and the optional `partition` and returns a java
+  future object."
   ([^Producer producer topic v]
    (let [record (ProducerRecord. topic v)]
      (.send producer record)))

(def default-value-serializer (StringSerializer.))

(defn ^KafkaProducer make-producer
  ([config]
   (make-producer config default-key-serializer default-value-serializer))


(ns hellhound.kafka.producers
  "This namespace contains thin wrappers around the official
  Kafka Producer API. Here is a very simple example:

  ```clj
  (def p (make-producer {\"bootstrap.servers\" \"localhost:9092\"}))
  (send p \"sometopic\" \"something\")
  (send p \"sometopic\" \"something else\")
  (close p)
  ```
  For more information please consult the KafkaProducer javadocs."
  (:require
   [hellhound.kafka.core :as core])

