Add ability to manually delete/purge poisoned messages in Vercel Queues

When a message becomes “poisoned” (fails repeatedly and can’t be processed), there’s no way to manually remove it. Attempting to query or lease the message via API returns a 404 Message Not Found error, leaving developers with no option but to wait for the message TTL to expire (up to 7 days, or 24 hours by default).

In my case, the callback code belonged to an old deployment and the issue couldn’t be fixed retroactively. Switching from push to poll didn’t help either - poisoned messages are simply invisible to the consumer. I also tried removing the old deployment, and while the logs and alerts stopped, bill kept increasing (Queue Notifications).

This creates a poor developer experience during incident recovery scenarios where you need to clear problematic messages quickly.

The preventative solution is to set a smaller TTL and limit retries both on send and in the callback ahead of time-but it still feels limiting to not have a backup method to recover when things go wrong.

My suggestion is to add API endpoints or dashboard controls to:

  • View/inspect poisoned messages

  • Manually delete or purge specific messages

  • Clear all messages in a topic or consumer group

Thank you,

Wiktor

1 Like

Hey @wiktorwisniewski94-4, welcome to the community!

Thank you for sharing this, I’ll pass it onto the team.

Update: it’s on the roadmap to make moving poisoned messages to the latest deployment possible

For now, you can manually move messages to a different topic that is not pinned to the deployment if they reach some number of retries.

Hope that helps in the meantime!

Hello @mayven , thank you for the reply!

Can you share how it’s done? I didn’t know you can move messages :sweat_smile: