Skip to content

feat(sqs): stop read mode after max_records - #125

Merged
Divyanshu Tiwari (divyanshu-tiwari) merged 4 commits into
mainfrom
feat/sqs-max-records
Sep 15, 2026
Merged

Divyanshu Tiwari (divyanshu-tiwari) merged 4 commits into
mainfrom
feat/sqs-max-records

Conversation

@divyanshu-tiwari

Copy link
Copy Markdown
Contributor

Summary

  • Adds Kafka-style max_records on the SQS reader (0/omitted = unlimited). Cap is per worker.
  • Next ReceiveMessage is sized to min(max_messages, remaining) so leftover receipts are not held until visibility timeout.
  • max_messages is unchanged (per-poll batch size, AWS cap 10).

Test plan

  • SQS pipeline with max_records set stops after that many forwarded messages and leaves the rest in the queue
  • Pipeline with neither max_records, exit_on_empty, nor end_after still polls until the job timeout
  • max_messages: 1 Keepa-style jobs are unaffected

Match Kafka: cap forwarded messages per worker and size the next
ReceiveMessage to remaining so leftover receipts are not held.
max_records only stops forwarding, matching Kafka. Do not shrink the poll.
Keep delivery mode from main and max_records stop from this branch.
@divyanshu-tiwari
Divyanshu Tiwari (divyanshu-tiwari) merged commit f91e862 into main Sep 15, 2026
7 checks passed
@divyanshu-tiwari
Divyanshu Tiwari (divyanshu-tiwari) deleted the feat/sqs-max-records branch September 15, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants