Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions docs/user/bots.md
Original file line number Diff line number Diff line change
Expand Up @@ -4306,14 +4306,30 @@ The whois request will be for `theguardian.co.uk`

### Wait <div id="intelmq.bots.experts.wait.expert" />

Waits for a some time or until a queue size is lower than a given number.
Waits for some time or until a queue size is not greater than a configured threshold.

Only one of the two modes is possible. If a queue name is given, the queue mode is active. If the sleep_time is a
number, sleep mode is active. Otherwise the dummy mode is active, the events are just passed without an additional
delay.

Note that SIGHUPs and reloads interrupt the sleeping.

#### Using queue mode for backpressure

Queue mode can be used to slow down one part of the botnet when a later queue already has a backlog. Put the Wait
expert before the slow bot or output and set `queue_name` to the downstream queue which should be watched. For every
event, the bot polls the Redis list length of `queue_name` and only forwards the event when the queue length is less
than or equal to `queue_size`.

Use `intelmqctl list queues` to check the queue names. For example, these runtime parameters wait until
`slow-output-queue` contains at most 1000 events before forwarding the next event:

```yaml
queue_name: slow-output-queue
queue_size: 1000
queue_polling_interval: 1
```

**Module:** `intelmq.bots.experts.wait.expert`

**Parameters:**
Expand All @@ -4336,7 +4352,7 @@ Note that SIGHUPs and reloads interrupt the sleeping.

**`queue_polling_interval`**

(required, float) Interval to poll the list length in seconds. Defaults to ?.
(optional, float) Interval to poll the list length in seconds. Defaults to 0.05.

**`queue_port`**

Expand Down
Loading