Skip to content

Commit

Permalink
Merge pull request #41 from RedHatInsights/fix_dlq_producer
Browse files Browse the repository at this point in the history
Fix minor bug on DLQ producer
  • Loading branch information
joselsegura authored Aug 26, 2022
2 parents 0590acf + 90c9eb7 commit b6fb746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ccx_messaging/consumers/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ def process_dead_letter(self, msg):
return

if isinstance(msg, ConsumerRecord):
self.producer.send(
self.dlq_producer.send(
self.dead_letter_queue_topic, str(msg.value).encode("utf-8")
)
else:
# just add at least some record in case that the message is not of the expected type
self.producer.send(self.dead_letter_queue_topic, str(msg).encode("utf-8"))
self.dlq_producer.send(self.dead_letter_queue_topic, str(msg).encode("utf-8"))

def _validate(self, msg):
try:
Expand Down

0 comments on commit b6fb746

Please sign in to comment.