dbos-inc / dbos-transact-py

Ultra-Lightweight Durable Execution in Python
https://docs.dbos.dev
MIT License
244 stars 7 forks source link

Dead Letter Queue #113

Closed kraftp closed 1 month ago

kraftp commented 1 month ago

This PR implements a dead letter queue for workflows. If a workflow execution is recovered more than N times (50 by default, configurable as an argument to @DBOS.Workflow), it is placed in the dead letter queue and no further attempts will be made to recover it.

The goal of this change is to reduce the damage caused by buggy workflows that crash the execution environment. Without a dead letter queue, these will be retried indefinitely, wasting resources and disrupting other works. With this change, they are retried a maximum number of times then placed in the DLQ for manual investigation and restart.