---
title: Delay/Rate-Limit
slug: litmusedge/delayrate-limit
docTags: 
createdAt: 2026-08-19T19:42:37.840Z
---

The Delay/Rate-Limit processor controls the flow of messages through an Analytics flow. It either delays each message before forwarding it or limits how many messages pass through per time window. Use it to smooth bursty traffic, pace calls to a downstream system, or throttle a noisy source.

## Modes

The **Action** parameter selects the behavior:

- `delay each message` holds each message for a period before forwarding it.
- `rate limit` caps how many messages pass through in a time window.

## Delay mode

When **Action** is `delay each message`, the **Delay Mode** parameter sets the strategy:

- `fixed delay` delays every message by a constant time, set by **Delay Time** and **Delay Time Units**.
- `random delay` delays each message by a random time between a minimum and a maximum, set by **Delay Random Time From** and **Delay Random Time To** and their units.
- `get delay from payload` reads the delay from a numeric `delay` field in the message. When that field is missing, the processor falls back to **Delay Time**.

## Rate limit mode

When **Action** is `rate limit`, the **Rate Mode** parameter sets the scope:

- `all messages` applies the limit to all messages together.
- `for each payload topic` applies the limit per topic, using the `topic` field in the payload, and releases messages round-robin across topics.

The processor allows **Rate Msg Count** messages per **Rate Msg Time** window, measured in **Rate Msg Time Units**. Enable **Rate Override From Payload** to take the rate from a `rate` field in the message instead. In rate limit mode, the processor keeps only the latest message and drops the intermediate ones.

## Intermediate messages

**Rate Intermediate Mode** controls what happens to messages that exceed the delay or rate limit:

- `queue intermediate payloads` buffers messages for later delivery, up to 1000. When the queue is full, the processor drops new messages to protect memory.
- `drop intermediate payloads` discards any message that exceeds the limit.

## Parameters

:::hint{type="info"}
**Note:** The delay fields appear only when **Action** is `delay each message`, and the rate fields appear only when **Action** is `rate limit`. The random delay fields appear only when **Delay Mode** is `random delay`.
:::

| **Parameters**               | **Details**                                                                                                                             |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Action                       | The mode of operation: `delay each message` or `rate limit`.                                                                            |
| Delay Mode                   | The delay strategy: `fixed delay`, `random delay`, or `get delay from payload`.                                                         |
| Delay Time                   | The delay for `fixed delay` mode, and the fallback for `get delay from payload` mode when the `delay` field is missing. Default is `1`. |
| Delay Time Units             | The units for the fixed delay: milliseconds, seconds, minutes, hours, days, or weeks.                                                   |
| Delay Random Time From       | The minimum delay used in `random delay` mode. Default is `1`.                                                                          |
| Delay Random Time From Units | The units for the minimum delay.                                                                                                        |
| Delay Random Time To         | The maximum delay used in `random delay` mode. Default is `10`.                                                                         |
| Delay Random Time To Units   | The units for the maximum delay.                                                                                                        |
| Rate Mode                    | The rate limiting scope: `all messages` or `for each payload topic`.                                                                    |
| Rate Msg Count               | The number of messages allowed per interval. Default is `1`.                                                                            |
| Rate Msg Time                | The size of the rate limit time window. Default is `1`.                                                                                 |
| Rate Msg Time Units          | The units for the rate interval: milliseconds, seconds, minutes, hours, days, or weeks.                                                 |
| Rate Override From Payload   | Allows the rate to be overridden by a `rate` field in the payload.                                                                      |
| Rate Intermediate Mode       | How the processor handles messages that exceed the delay or rate limit: `queue intermediate payloads` or `drop intermediate payloads`.  |

