Skip to content

Commit f9352fe

Browse files
committed
[ESM] Correctly enable exponential backoff inside stream poller
1 parent 80e33b3 commit f9352fe

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
@@ -202,7 +202,9 @@ def poll_events_from_shard(self, shard_id: str, shard_iterator: str):
202202
attempts = 0
203203
error_payload = {}
204204

205-
boff = ExponentialBackoff(max_retries=attempts)
205+
max_retries = self.stream_parameters.get("MaximumRetryAttempts", -1)
206+
# NOTE: max_retries == 0 means exponential backoff is disabled
207+
boff = ExponentialBackoff(max_retries=max_retries)
206208
while (
207209
not abort_condition
208210
and not self.max_retries_exceeded(attempts)

0 commit comments

Comments
 (0)