   (:require [immutant.messaging.codecs :as codecs]
             [immutant.registry         :as reg]))
 
-(defn start 
+(defn start
   "Create a message destination; name should be prefixed with either /queue or /topic"
   [name & opts]
   (cond

   (topic-name? name) (apply start-topic name opts)
   :else         (throw (Exception. "Destination names must start with /queue or /topic"))))

(defn publish 
  "Send a message to a destination. dest can either be the name of the
destination or a javax.jms.Destination. Returns the JMS message object
that was published.

The following options are supported [default]:
  :encoding        :clojure :json or :text [:clojure]

               :selector (str "JMSCorrelationID='" (.getJMSMessageID message) "'"))))))

(defn respond
  "Listen for messages on queue sent by the request function and respond with the
result of applying f to the message. queue can either be the name of the
queue or a javax.jms.Queue. Accepts the same options as listen."
  [queue f & {:keys [decode?] :or {decode? true} :as opts}]
