Bogdanp / Bogdanp/dramatiq_sqs

Support in-place requeue with `Retries`

Open
#46 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
68
Forks
29
Avg merge
1h 45m
Merged PRs (30d)
1

Description

From https://github.com/Bogdanp/dramatiq_sqs/issues/10#issuecomment-4209078759:

> #### How to track retry counts without re-queuing?
> I support the overall direction with relying on `ApproximateReceiveCount` and extending the `VisibilityTimeout`. However, I would still hope to plug those in without reimplementing the whole middleware. Some ideas off the top of my head:
> - upon receving each message, do `message.options["retries"] = sqs_message["ApproximateReceiveCount"]` and the stop condition and backoff math of the vanilla `Retries` are immediately supported;
> - as for the actual retry, we somehow need to make the last call of `broker.enqueue(message, delay=delay)` do nothing _iff `message` is already known aka has been received_. I was thinking of upgrading `message_refc` to a set of `ReceiptHandle`s to support this check;
> - might actually be the case for proposing a sort of `requeue_in_place` API to Dramatiq but I would start with a localised hack for now.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.