Skip to content
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

Wait for batch size to be reached before processing #78

Open
adriaandotcom opened this issue Sep 26, 2024 · 0 comments
Open

Wait for batch size to be reached before processing #78

adriaandotcom opened this issue Sep 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@adriaandotcom
Copy link

Feature request
It would be great to have a feature that allows for waiting until a specified batch size is reached before processing a batch of jobs. This would enable more efficient batch processing and help improve performance.

Use Case
In our case, we use the Elasticsearch bulk API to ingest data. The performance difference between ingesting 50 documents at once versus processing them individually is significant. Waiting for 50 jobs to accumulate before triggering the batch in BullMQ would vastly improve our workload efficiency and reduce processing overhead.

Proposed Solution

  • Add a configurable option to delay batch processing until the batch size limit is reached.
  • Optionally, include a timeout so the batch is processed after a certain time even if the batch size is not fully reached.

This feature would make BullMQ an even better fit for use cases involving bulk processing, like ours.

@manast manast added the enhancement New feature or request label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants