Delivery Guarantees
By default, LiteJoin operates under a best-effort delivery model. If a sink fails to accept a result (HTTP timeout, Kafka broker unavailable), the result is logged and dropped. When at-least-once delivery is enabled, failed deliveries are captured in a persistent dead-letter queue (DLQ) backed by SQLite and retried automatically with exponential backoff.Enabling At-Least-Once Delivery
How It Works
- The joiner attempts to deliver a result via
sink.Send(). - If delivery fails, the result is serialized to JSON and written to the DLQ database.
- A background RetryWorker periodically scans for entries whose retry time has passed.
- On success, the entry is deleted from the DLQ.
- On failure, the entry’s retry count and next retry time are updated with exponential backoff.
Configuration Reference
Retry Backoff
Retries use exponential backoff with jitter:max_backoff: 5m:
Eviction Policies
Two independent policies control DLQ growth:- TTL-based: Entries older than
ttlare deleted on cleanup sweeps. - Size-based: When the DLQ exceeds
max_size_mb, oldest entries are removed until the file drops below 90% of the limit.
Important Considerations
Ordering is not guaranteed. Retried results may arrive after results produced later. Use the
emit_at timestamp for ordering if needed.