   [^javax.jms.XAConnection listener]
   (.close listener))
 
-(defn stop 
+(defn stop
   "Destroy a message destination. Typically not necessary since it
   will be done for you when your app is undeployed. This will fail
   with a warning if any handlers are listening"

  (:require [immutant.messaging.codecs :as codecs]
            [immutant.registry         :as reg]))

(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. If the message is a javax.jms.Message,
then the message is sent without modification to dest. Returns the JMS message
object that was published.

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