From 490652071f5cb0477ebbe5e990ec5d70f7c7f22c Mon Sep 17 00:00:00 2001 From: Anmol Vijaywargiya Date: Mon, 25 Apr 2022 13:34:13 +0530 Subject: [PATCH] Clojure doc for the method publish --- src/ziggurat/messaging/producer.clj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ziggurat/messaging/producer.clj b/src/ziggurat/messaging/producer.clj index 4df9db8e..d20fc87a 100644 --- a/src/ziggurat/messaging/producer.clj +++ b/src/ziggurat/messaging/producer.clj @@ -104,6 +104,13 @@ (:non-recoverable-exception (publish-retry-config))) (defn publish + "This is meant for publishing to rabbitmq. + * Checks if the pool is alive - We do this so that publish does not happen after the channel pool state is stopped. + * publish-internal returns multiple states + * :success - Message has been successfully produced to rabbitmq + * :retry - A retryable exception was encountered and message will be retried until it is successfully published. + * :retry-with-counter - A non recoverable exception is encountered, but the message will be retried for a few times. defined by the counter + { :rabbit-mq-connection { :publish-retry { :non-recoverable-exception {:count}}}}}" ([exchange message-payload] (publish exchange message-payload nil)) ([exchange message-payload expiration]