kithara.middlewares.confirmation

wrap-confirmation

(wrap-confirmation message-handler _)

Wrap the given function, taking a kithara message map and producing a confirmation map, to ACK/NACK/REJECT the original message based on keys contained within. :status can have any of the following values:

  • :ack
  • :nack
  • :reject
  • :error (an uncaught exception occured)
  • :done (do nothing since the message was already explicitly handled)

For :nack, :reject and :error, an additional key :requeue? can be given to indicate whether or not the message should be requeued.

This is a middleware activated by default in the kithara base consumer.