Resilience icon

Resilience

Retry, concurrency, and dead-letter utilities for workflows

Actions6

Concurrency Gate → Acquire

AI-generated

Summary

Acquire a lock for each input item under the configured gate key, up to the concurrency limit. Route items to the Allowed or Blocked output and add lock status metadata at __concurrencyGate.

Inputs

  • Gate Key (required) — Identifies the gate shared by workflow items, such as a customer ID or service name. The value is trimmed before use.
  • Max Concurrent — Maximum active locks for the key; defaults to 1.
  • Lock TTL Seconds — How long each acquired lock stays active before expiring; defaults to 300 seconds.
  • On Limit Reached — When the limit is reached, either route the item to Blocked or allow it through without acquiring a lock and mark that in its metadata. Defaults to routing it to Blocked.
  • Preserve Original Item — When enabled, retain the input JSON and binary data alongside the metadata; defaults to true.

Output shape

Two outputs: Allowed and Blocked, each containing a list of items.

Each item includes __concurrencyGate metadata with the gate key, whether a lock was acquired, active lock count, limit, reason, and—when acquired—the lock ID and expiry time. Gate state is stored in workflow global static data; expired locks are cleaned up when the operation runs. Items that hit the limit go to Blocked only when On Limit Reached is set to Route to Blocked Output; otherwise they appear on Allowed without a lock.

Links

Discussion