Skip to content

What's the correct way to handle dead-letter queue #1078

@tryffel

Description

@tryffel

Hi,

it would be helpful to have functionality for dead-letter queue.
Example use case would be to retry task N times and after that, run specific callback to handle permanent failure in application logic.
Now this is not possible since the task handler doesn't have visibility into task's failure count.

A good way to handle this could be either to have separate deadletterqueue-handler similar to existing error handler that is called before moving the task into archive: TaskArchived(task).
Alternatively, call the same task handler, but expose the retry count / state transition info into task type so that the handler can handle the case with e.g. if task.IsArchived().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions