Skip to content

Commit

Permalink
Adds error log
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol Vijaywargiya committed Apr 26, 2022
1 parent 0cce535 commit 515492d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ziggurat/messaging/producer.clj
Expand Up @@ -124,9 +124,11 @@
(Thread/sleep (:sleep (publish-retry-config)))
(log/info "Retrying publishing the message to " exchange)
(recur exchange message-payload expiration counter))
(= result :retry-with-counter) (when (and (:enabled (non-recoverable-exception-config)) (pos? counter))
(Thread/sleep (:sleep (non-recoverable-exception-config)))
(recur exchange message-payload expiration (dec counter))))))))
(= result :retry-with-counter) (if (and (:enabled (non-recoverable-exception-config)) (pos? counter))
(do
(Thread/sleep (:sleep (non-recoverable-exception-config)))
(recur exchange message-payload expiration (dec counter)))
(log/error "Publishing the message has failed. It is being dropped")))))))

(defn- retry-type []
(-> (ziggurat-config) :retry :type))
Expand Down

0 comments on commit 515492d

Please sign in to comment.