Skip to content
mittr

FIFO Delivery

FIFO (First-In, First-Out) delivery guarantees events are delivered in order, one at a time, per partition key.

  • State machines: status transitions must arrive in order
  • Financial transactions: debits before credits
  • User actions: create → update → delete must not reorder
Terminal window
curl -X POST https://app.mittr.io/api/v1/endpoints \
-H "X-API-Key: mtr_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.example.com/webhooks",
"eventTypes": ["order.*"],
"fifo": true,
"fifoPartitionKey": "$.data.orderId"
}'

The fifoPartitionKey is a JSONPath expression evaluated against each event payload:

  • $.data.orderId — events for the same order delivered sequentially
  • $.data.customerId — events for the same customer delivered sequentially
  • Different partition keys are processed in parallel

Without a partition key, all events to that endpoint are strictly sequential (single partition).

  1. Events are queued in a dedicated FIFO queue per endpoint
  2. A FIFO worker dequeues one event per partition at a time
  3. The event is delivered and acknowledged before the next is dequeued
  4. If delivery fails, retries follow the endpoint’s retry policy
  5. The partition is blocked until the failed event succeeds or is moved to dead letter
Standard deliveryFIFO delivery
OrderingNo guaranteeStrict per-partition
ThroughputHigh (parallel)Lower (sequential)
BlockingNoneHead-of-line per partition
Use caseNotifications, alertsState machines, transactions
  • Head-of-line blocking: A stuck event blocks its partition until it succeeds or goes to dead letter. Other partitions are unaffected.
  • Parallelism: Different partition keys process concurrently — only events within the same partition are sequential.