Permalink
Browse files

Make langohr.confirm/add-listener return a channel

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...
1 parent d3555f2 commit e55621d9b1dff1245851edb301601ac4ba943a38 Michael Klishin committed Feb 27, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/clojure/langohr/confirm.clj
@@ -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"
[^clojure.lang.IFn ack-handler ^clojure.lang.IFn nack-handler]
(reify ConfirmListener
@@ -26,11 +26,11 @@
(nack-handler delivery-tag multiple))))
-(defn add-listener
+(defn ^Channel add-listener
"Adds confirmations listener to given channel"
[^Channel channel ^ConfirmListener cl]
(.addConfirmListener channel cl)
- cl)
+ channel)
(defn select

0 comments on commit e55621d

Please sign in to comment.