diff --git a/ccx_messaging/consumers/consumer.py b/ccx_messaging/consumers/consumer.py index 8fa5719..cb04fd7 100644 --- a/ccx_messaging/consumers/consumer.py +++ b/ccx_messaging/consumers/consumer.py @@ -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: