Quick Start
1
Works out of the box
Resilience is on by default — no config needed. Every bot adapter already retries transient failures automatically.
2
Tune retries and park failures in a DLQ
Set
outbound_resilience in praisonai.yml to customise backoff and persist exhausted failures for replay.How It Works
When a send fails, the adapter classifies the error:Which Channels Does This Apply To?
Resilience is on by default for every adapter. The operator only opts into DLQ by settingdlq_path.
Before this feature shipped, retry/backoff only existed in the Telegram adapter. It is now the default for every adapter via the shared
OutboundResilienceMixin, with no API change required.Configuration Options
All settings live underoutbound_resilience in your channel config (in praisonai.yml or via BotConfig).
Full YAML example:
Common Patterns
Opt one channel out:Best Practices
Default values are sane — only tune when you see real DLQ growth
Default values are sane — only tune when you see real DLQ growth
The defaults (
initial_ms=1000, max_ms=10000, max_attempts=3) handle the vast majority of transient failures. Only adjust them after observing DLQ entries accumulating in your SQLite file — that signals the defaults are too aggressive or too conservative for your traffic.Use a persistent dlq_path (not /tmp or a container tmpfs)
Use a persistent dlq_path (not /tmp or a container tmpfs)
Store the DLQ on a persistent, local filesystem path. If you use
/tmp or an in-container tmpfs, parked failures are lost on restart — defeating the purpose of the DLQ.Don't disable resilience just because retries are slow — increase factor or max_ms instead
Don't disable resilience just because retries are slow — increase factor or max_ms instead
Slow retries usually mean the platform backoff is long (e.g.,
Retry-After: 60). The mixin already honours Retry-After headers automatically. Increase max_ms to allow longer waits rather than disabling resilience entirely.Pair with Durable Delivery when you need crash-safety across process restarts
Pair with Durable Delivery when you need crash-safety across process restarts
Outbound Resilience retries within a single process lifetime. If your process crashes mid-retry, the message is lost (unless
dlq_path is set and the entry was already parked). For full crash-safe delivery with SQLite outbox and startup drain, use Durable Delivery alongside Outbound Resilience.Related
Durable Outbound Delivery
SQLite outbox for crash-safe delivery with send_durable() and startup drain
Inbound DLQ
Dead-letter queue for failed inbound message processing
Bot Rate Limiting
Per-user and per-channel rate limiting for bot commands
Gateway Channel Config
Full reference for all per-channel configuration options

