      (onyx.api/shutdown conn)
      (catch Exception e (prn e)))))
 
-(fact @results => (conj (vec (map (fn [x] {:n x}) (range 1 11))) :done))
+(fact @results => (conj (vec (map (fn [x] {:n x}) (range 1 (inc n-messages)))) :done))
 

  (:import [org.hornetq.api.core.client HornetQClient]
           [org.hornetq.api.core TransportConfiguration HornetQQueueExistsException]
           [org.hornetq.core.remoting.impl.netty NettyConnectorFactory]))

(def in-queue (str (java.util.UUID/randomUUID)))



(def producer (.createProducer session in-queue))

(doseq [n (range n-messages)]
  (let [message (.createMessage session true)]
    (.writeString (.getBodyBuffer message) (pr-str {:n n}))
    (.send producer message)))
