# TTL (Time To Live) for ACDC-Gateway messages

Configure TTL (Time To Live) for ACDC-Gateway messages using two new settings in the appSettings.config file. These settings determine how long messages stay in the queue before they are automatically discarded.

MQTT Message TTL

- Setting name: MqttMessageExpirationTimeInHours

- Description: Specifies the TTL (in hours) for messages sent via MQTT. After this time, messages will be discarded from topic.

- Default value: 24 hours

- How to disable TTL: Leave the value empty to disable TTL for MQTT messages

This setting is only applicable when using MQTT Client v5

RabbitMQ Message TTL

- Setting name: PublishingRabbitMqMessageExpirationTimeInHours

- Description: Specifies the TTL (in hours) for messages sent via RabbitMQ. After this, the messages will be removed from the queue.

- Default value: 24 hours

- How to disable TTL: Leave the value empty to disable TTL for RabbitMQ messages