8000 [ESM] Correctly enable exponential backoff inside stream poller · localstack/localstack@20d4e1f · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 20d4e1f

Browse files
committed
[ESM] Correctly enable exponential backoff inside stream poller
1 parent e509f9d commit 20d4e1f

File tree

1 file changed

+3
-1
lines changed
  • localstack-core/localstack/services/lambda_/event_source_mapping/pollers

1 file changed

+3
-1
lines changed

localstack-core/localstack/services/lambda_/event_source_mapping/pollers/stream_poller.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ def poll_events_from_shard(self, shard_id: str, shard_iterator: str):
198198
attempts = 0
199199
error_payload = {}
200200

201-
boff = ExponentialBackoff(max_retries=attempts)
201+
max_retries = self.stream_parameters.get("MaximumRetryAttempts", -1)
202+
# NOTE: max_retries == 0 means exponential backoff is disabled
203+
boff = ExponentialBackoff(max_retries=max_retries)
202204
while (
203205
not abort_condition
204206
and not self.max_retries_exceeded(attempts)

0 commit comments

Comments
 (0)
0