Skip to content

feat: add support for batch execution in parallel with custom Executor #1900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

visheshruparelia
Copy link

#1864

Description of changes:

Add a new method in the BatchHandler class which allows users to pass their custom Executor for processing messages in parallel.

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
9.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@@ -44,4 +44,11 @@ public void copyMDCToThread(String thread) {
mdcAwareThreads.add(thread);
}
}

public void removeThread(String thread) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will be helpful if the same invocation of processBatchInParallel() ends up re-using the thread.

@visheshruparelia
Copy link
Author

@phipag sonar is failing due to duplication in Kinesis and DynamoDB handlers. The same duplication exists for the already existing method as well. As a result, I followed the same pattern for the new method too. If you want, we can move the duplicated block for both (older and newer) methods to a common static utlilty method but IMO this duplication is ok. Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Pending review
Development

Successfully merging this pull request may close these issues.

1 participant