Skip to content

Commit

Permalink
Make langohr.confirm/add-listener return a channel
Browse files Browse the repository at this point in the history
Consistent with langohr.core/add-return-listener and makes much more sense
since it enables the function to be used with the threading macro (->)
that thread channels.
  • Loading branch information
Michael Klishin committed Feb 27, 2013
1 parent d3555f2 commit e55621d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/clojure/langohr/confirm.clj
Expand Up @@ -16,7 +16,7 @@
;; ;;




(defn listener (defn ^ConfirmListener listener
"Instantiates and returns a new confirmations listener that handles basic.ack and basic.nack method deliveries" "Instantiates and returns a new confirmations listener that handles basic.ack and basic.nack method deliveries"
[^clojure.lang.IFn ack-handler ^clojure.lang.IFn nack-handler] [^clojure.lang.IFn ack-handler ^clojure.lang.IFn nack-handler]
(reify ConfirmListener (reify ConfirmListener
Expand All @@ -26,11 +26,11 @@
(nack-handler delivery-tag multiple)))) (nack-handler delivery-tag multiple))))




(defn add-listener (defn ^Channel add-listener
"Adds confirmations listener to given channel" "Adds confirmations listener to given channel"
[^Channel channel ^ConfirmListener cl] [^Channel channel ^ConfirmListener cl]
(.addConfirmListener channel cl) (.addConfirmListener channel cl)
cl) channel)




(defn select (defn select
Expand Down

0 comments on commit e55621d

Please sign in to comment.