diff --git a/notifications_consumer/config.py b/notifications_consumer/config.py index b315b8209f39042d0ea052e9afc33f6e4100d21a..767c8d6ec763d580d1b2dcf83a6321143a793152 100644 --- a/notifications_consumer/config.py +++ b/notifications_consumer/config.py @@ -42,6 +42,7 @@ class Config: # ActiveMQ CONSUMER_NAME = os.getenv("CONSUMER_NAME") PUBLISHER_NAME = os.getenv("PUBLISHER_NAME") + TTL = int(os.getenv("TTL", 172800)) # Email EMAIL_HOST = os.getenv("EMAIL_HOST", "localhost") diff --git a/notifications_consumer/processors/email_gateway/processor.py b/notifications_consumer/processors/email_gateway/processor.py index 5ecf4b7e9ec4d418eeda781eb8ccd19659db5850..726eecf8e8915edb6d4e3d789d5216fb49d2801f 100644 --- a/notifications_consumer/processors/email_gateway/processor.py +++ b/notifications_consumer/processors/email_gateway/processor.py @@ -110,6 +110,7 @@ class MailGatewayProcessor(Processor): self.publisher.send( message, extension=Config.EMAIL_GATEWAY_DLQ, + ttl=Config.TTL, headers={"persistent": "true"}, )