# MQTT Options

## Retry Interval

Set the time in seconds after a `QoS=1 or QoS=2` message has been sent that VerneMQ will wait before retrying when no response is received.

```
retry_interval = 20
```

This option default to `20` seconds.

## Inflight Messages

This option defines the maximum number of QoS 1 or 2 messages that can be in the process of being transmitted simultaneously.

```
max_inflight_messages = 20
```

Defaults to `20` messages, use `0` for no limit. The inflight window serves as a protection for sessions, on the incoming side.

## Load Shedding

The maximum number of messages to hold in the queue above those messages that are currently in flight. Defaults to `1000`. Set to `-1` for no limit. This option protects a client session from overload by dropping messages (of any QoS).

```
max_online_messages = 1000
```

Defaults to `1000` messages, use `-1` for no limit. This parameter was named `max_queued_messages` in `0.10.*`. Note that `0` will totally block message delivery from any queue!

This option specifies the maximum number of QoS 1 and 2 messages to hold in the offline queue.

```
max_offline_messages = 1000
```

Defaults to `1000` messages, use `-1` for no limit, use `0` if no messages should be stored.

In contrast to the session based inflight window, max\_online\_messages and max\_offline\_messages serves as a protection of queues, on the outgoing side.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.vernemq.com/1.8.0/configuration/options.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
