Dramatiq

Azure Queue message deletion failure causes duplicate processing

critical
availabilityUpdated Apr 21, 2025(via Exa)
Technologies:
How to detect:

When using dramatiq-azure broker, after successful message processing, post_process_message fails to delete the message from Azure Queue with ResourceNotFoundError (MessageNotFound). This causes the queue to fill with tens or hundreds of duplicate messages and increasing dequeue counts, leading to repeated processing of the same message.

Recommended action:

Monitor for 'Unhandled error during post_process_message' errors in worker logs. Implement idempotent message handlers to prevent duplicate processing side effects. Check Azure Queue dequeue counts for abnormal increases. This is a bug in the third-party dramatiq-azure broker; consider switching back to RabbitMQ or using a different Azure Queue integration until resolved.