Allow events to be emitted at a consistent, limited rate. Throttle mode helps you to respect rate limits when interacting with 3rd party APIs. This logic is applied to all events regardless of which story run they are from.
Features
Emit events at a limited rate and at consistent intervals.
This logic is applied to all events across all story runs - separate story runs are not given separate capacity.
The newly emitted Event will also contain an
capacity
key which shows the capacity of the action when the event was emitted.Throttled events are placed in a queue until they are emitted. Events will be dropped instead of being added to the queue if there are 2,000 or more events in the queue already.
Configuration Options
mode
: 'throttle'.capacity
: When using 'throttle' mode, choose how many events can be emitted by the action each minute.
Emitted Events
{
"capacity": "10"
}
Example Configuration Options
Allow 10 events from all story runs to be emitted each minute. With this configuration, an event will be emitted every 6 seconds.
{
"mode": "throttle",
"capacity": "10"
}