Skip to content

Commit

Permalink
using channel-retry-count method from ziggurat.config
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek.khatri authored and mjayprateek committed Jul 6, 2022
1 parent 1250fec commit 165e29c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ziggurat/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,6 @@

(defn get-configured-retry-count []
(-> (ziggurat-config) :retry :count))

(defn get-channel-retry-count [topic-entity channel]
(:count (channel-retry-config topic-entity channel)))
4 changes: 2 additions & 2 deletions src/ziggurat/mapper.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns ziggurat.mapper
(:require [clojure.string :as str]
[sentry-clj.async :as sentry]
[ziggurat.config :refer [ziggurat-config get-configured-retry-count]]
[ziggurat.config :refer [ziggurat-config get-configured-retry-count get-channel-retry-count]]
[ziggurat.messaging.producer :as producer]
[ziggurat.metrics :as metrics]
[ziggurat.new-relic :as nr]
Expand Down Expand Up @@ -83,7 +83,7 @@
failure-metric "failure"
dead-letter-metric "dead-letter"
multi-message-processing-namespaces [message-processing-namespaces [message-processing-namespace]]
user-payload (create-user-payload message-payload (producer/get-channel-retry-count topic-entity channel))]
user-payload (create-user-payload message-payload (get-channel-retry-count topic-entity channel))]
(clog/with-logging-context {:consumer-group topic-entity-name :channel channel-name}
(nr/with-tracing "job" metric-namespace
(try
Expand Down

0 comments on commit 165e29c

Please sign in to comment.