Skip to content

Commit

Permalink
Fixed linting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol Vijaywargiya committed May 19, 2022
1 parent b10d80b commit a1742d9
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/ziggurat/messaging/producer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,13 @@
(metrics/increment-count ["rabbitmq" "publish"] "exception" {:topic-entity (name (:topic-entity message-payload))
:retry-counter retry-counter})
:retry-with-counter)))
<<<<<<< HEAD

=======
>>>>>>> 6a8eb91... Add retry states for publish

(defn- publish-retry-config []
(-> (ziggurat-config) :rabbit-mq-connection :publish-retry))

(defn- non-recoverable-exception-config []
(: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.
Expand All @@ -125,9 +120,8 @@
(when (is-pool-alive? cpool/channel-pool)
(let [result (publish-internal exchange message-payload expiration retry-counter)]
(when (pos? retry-counter)
(do
(log/info "Retrying publishing the message to " exchange)
(log/info "Retry attempt " retry-counter)))
(log/info "Retrying publishing the message to " exchange)
(log/info "Retry attempt " retry-counter))
(log/info "Publish result " result)
(cond
(= result :success) nil
Expand Down

0 comments on commit a1742d9

Please sign in to comment.