Skip to content

Commit

Permalink
Use producer connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol Vijaywargiya committed Apr 12, 2022
1 parent 555def1 commit 8cca3ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ziggurat/messaging/consumer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[ziggurat.messaging.channel_pool :as cpool]
[ziggurat.kafka-consumer.consumer-handler :as ch]
[ziggurat.mapper :as mpr]
[ziggurat.messaging.connection :refer [consumer-connection]]
[ziggurat.messaging.connection :refer [consumer-connection, producer-connection]]
[ziggurat.messaging.util :as util]
[ziggurat.metrics :as metrics]
[ziggurat.util.error :refer [report-error]]
Expand Down Expand Up @@ -109,7 +109,7 @@
"This method deletes `count` number of messages from RabbitMQ dead-letter queue for topic `topic-entity` and channel
`channel`."
[topic-entity channel count]
(with-open [ch (lch/open connection)]
(with-open [ch (lch/open producer-connection)]
(let [queue-name (construct-queue-name topic-entity channel)]
(doall (for [_ (range count)]
(lb/get ch queue-name true))))))
Expand Down

0 comments on commit 8cca3ab

Please sign in to comment.