justeattakeaway / JustSaying

A light-weight message bus on top of AWS services (SNS and SQS).
Apache License 2.0
48 stars 18 forks source link

Publish Retry logic review and docs #506

Closed AnthonySteele closed 4 years ago

AnthonySteele commented 5 years ago

Is your feature request related to a problem? Please describe.

Slow publishes and even time-outs when publishing do happen. That's an SQS issue, but the code has to deal with it. I get questions about how the publish retry logic works, and how best to set it up. I don't have clear answers about how all the parts interact.

There are publish retry settings inside the AWS SDK, and in JustSaying - do they stack? If there are 3 retries in each of those laters is that 9 tries total?

The caller can also pass in a CancellationToken to the Publish() to time it out after a set time (or whatever other logic they might use to invalidate the token). If they use this, should they then retry with e.g. Polly?

Describe the solution you'd like

Let's clarify and document.

Good docs, possibly even review and simplification of the relevant codes.

And examples for what to do in cases where

Which combination of timeout and retry is likely to give best results. e.g. given 15 second, is it better to try once with a 15 second timeout, or 3 times with a 5 second timeout each?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

Closed automatically due to inactivity.