Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Add an ack request for each task polled from queue, when polling in batches #2954

Merged
merged 1 commit into from
May 2, 2022
Merged

Add an ack request for each task polled from queue, when polling in batches #2954

merged 1 commit into from
May 2, 2022

Conversation

gardusig
Copy link
Contributor

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew generateLock saveLock to refresh dependencies)
  • WHOSUSING.md
  • Other (please describe):

Changes in this PR

When polling for tasks in batches, it currently does not sends an ack request for the queue, implying that it should be put again at the queue after some previously set timeout.

With that change, it will send an ack request for each valid polled task.

Issue #

Alternatives considered

This job could be done inside the above loop which add each task into the returned list, but it may happen that a server dies inside the loop, acknowledging some tasks that could not be returned.

Other possibility is to run the task ack in parallel, although, it may create an unnecessary thread layer and more responsibility to the class/method.

@apanicker-nflx apanicker-nflx added the type: feature New feature label May 2, 2022
@apanicker-nflx apanicker-nflx merged commit 309afc6 into Netflix:main May 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants