 (defn write! [config queue-name messages echo]
   (let [tc (TransportConfiguration. (.getName NettyConnectorFactory) config)
         locator (HornetQClient/createServerLocatorWithoutHA (into-array [tc]))
+        _ (.setReconnectAttempts locator -1)
         session-factory (.createSessionFactory locator)
         session (.createTransactedSession session-factory)]   
     

(defn consume-queue! [config queue-name echo]
  (let [tc (TransportConfiguration. (.getName NettyConnectorFactory) config)
        locator (HornetQClient/createServerLocatorWithoutHA (into-array [tc]))
        session-factory (.createSessionFactory locator)
        session (.createTransactedSession session-factory)]


(defn read! [config queue-name n echo]
  (let [tc (TransportConfiguration. (.getName NettyConnectorFactory) config)
        locator (HornetQClient/createServerLocatorWithoutHA (into-array [tc]))
        _ (.setReconnectAttempts locator -1)
        session-factory (.createSessionFactory locator)
        session (.createTransactedSession session-factory)]

