langohr.confirm

Functions that work with publisher confirms.

Relevant guides:

* http://clojurerabbitmq.info/articles/exchanges.html

add-listener

(add-listener channel cl)
Adds confirmations listener to given channel

listener

(listener ack-handler nack-handler)
Instantiates and returns a new confirmations listener that handles basic.ack and basic.nack method deliveries

select

(select channel)(select channel ack-handler nack-handler)
Activates publishing confirmations on given channel.

wait-for-confirms

(wait-for-confirms channel)(wait-for-confirms channel timeout)
Wait until all messages published since the last call have been
either ack'd or nack'd by the broker. Note, when called on a
non-Confirm channel, waitForConfirms throws an IllegalStateException.

Returns true if all messages were acked successfully,
false otherwise.

wait-for-confirms-or-die

(wait-for-confirms-or-die channel)(wait-for-confirms-or-die channel timeout)
Wait until all messages published since the last call have been
either ack'd or nack'd by the broker. If any of the messages were
nack'd, waitForConfirmsOrDie will throw an IOException. When called on
a non-Confirm channel, it will throw an IllegalStateException.