feat: retry after rate limit error - #713
Open
Fabian Boensch (En0Ma1259) wants to merge 18 commits into
Open
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Michel (cyl3x)
approved these changes
Jun 30, 2026
Fabian Boensch (En0Ma1259)
force-pushed
the
feat/rate-limit-retry
branch
from
July 1, 2026 06:57
6284373 to
61e13d9
Compare
# Conflicts: # CHANGELOG.md # CHANGELOG_de-DE.md # composer.json # phpstan.neon.dist
Fabian Boensch (En0Ma1259)
force-pushed
the
feat/rate-limit-retry
branch
from
July 20, 2026 13:50
3bdcac1 to
a361783
Compare
Fabian Boensch (En0Ma1259)
force-pushed
the
feat/rate-limit-retry
branch
from
July 27, 2026 08:39
5b17529 to
f84a0b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retry-Afterfor shipping tracking rate limits #624Problem
PayPal shipping tracking sync can receive 429 rate-limit responses with a Retry-After header. Retrying immediately, or only using the default Messenger backoff, can exhaust retries too early and move otherwise recoverable shipping sync messages into the failure flow.
Why this matters
For bulk delivery updates, PayPal may explicitly tell us when the next retry should happen. The async shipping sync should respect that delay while still keeping the normal Messenger retry limit.
Implementation
The SDK-provided retry timestamp is now transferred onto PayPalApiException.
A dedicated retry strategy for the async transport adjusts the waiting time for ShippingInformationMessage when a PayPal retry delay is available.
The strategy decorates Symfony’s default multiplier retry strategy, so existing behavior such as max_retries, exponential backoff, and failure transport handling still applies.
RecoverableMessageHandlingException is not used because it bypasses the normal max-retry decision in some Messenger flows and is not consistently supported by all queue transports. Decorating the retry strategy lets us apply Retry-After only as the delay calculation while preserving Messenger’s regular retry lifecycle.