kithara.middlewares.confirmation-defaults
wrap-confirmation-defaults
(wrap-confirmation-defaults message-handler {:keys [default-confirmation error-confirmation], :or {default-confirmation {:status :ack}, error-confirmation {:status :nack}}})Wrap the given function, taking a kithara message map, making sure it returns a kithara confirmation map to be processed by wrap-confirmation.
:default-confirmationwill be used if the result is not a map or does not contain a valid:statuskey.:error-confirmationwill be used if an exception is encountered (with the exception beingassoced into the map as:error).
This is a middleware activated by default in the kithara base consumer.