# Path: microcosm_pubsub/constants.py
# TTL_KEY = "X-Request-Ttl"


from microcosm_pubsub.constants import TTL_KEY
        self.message_id = message_id
        self.receipt_handle = receipt_handle
        self.topic_arn = topic_arn
        self.approximate_receive_count = approximate_receive_count
        self.handler = handler

    def ack(self):
        """
        Acknowledge this message was processed successfully.

        """
        self.consumer.ack(self)

    def nack(self, visibility_timeout_seconds=None):
        """
        Acknowledge this message was NOT processed successfully.

        """
        self.consumer.nack(self, visibility_timeout_seconds)

    @property
    def opaque_data(self):
        if not self.content:
            return dict()
        return self.content.get("opaque_data", {})

    @property
    def ttl(self):
        if TTL_KEY not in self.opaque_data:
            return None

# Path: microcosm_pubsub/constants.py
# TTL_KEY = "X-Request-Ttl"


# Path: microcosm_pubsub/message.py
from microcosm_pubsub.constants import TTL_KEY

        self.message_id = message_id
        self.receipt_handle = receipt_handle
        self.topic_arn = topic_arn
        self.approximate_receive_count = approximate_receive_count
        self.handler = handler

    def ack(self):
        """
        Acknowledge this message was processed successfully.

        """
        self.consumer.ack(self)

    def nack(self, visibility_timeout_seconds=None):
        """
        Acknowledge this message was NOT processed successfully.

        """
        self.consumer.nack(self, visibility_timeout_seconds)

    @property
    def opaque_data(self):
        if not self.content:
            return dict()
        return self.content.get("opaque_data", {})

    @property
    def ttl(self):
        if TTL_KEY not in self.opaque_data:
            return None

        return int(self.opaque_data[TTL_KEY])