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

Create JDBCBatchItemReader for reading multiple records at a time [BATCH-2548] #1054

spring-issuemaster opened this issue Oct 15, 2016 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Oct 15, 2016

sathiyaseelan muthukumar opened BATCH-2548 and commented


In Processor, we have to execute multiple database calls for each record from the reader.
We could reduce the number of database calls using in clause, if we get multiple records at a time from reader to processor instead of one record at a time.

It would be better, that if we have a reader with configurable chunk size, that would return list of Items (something like AggregateJDBCItemReader).


No further details from BATCH-2548


This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Nov 4, 2018

Mahmoud Ben Hassine commented

The contract of an item reader is to read one item at a time. Making it return multiple items would be a breaking change and more importantly not compatible anymore with the mechanics of retry/skip that Spring Batch provides.

That said, the interface is generic, so nothing prevents you from making an item reader return a list of items. However, we would not include such an implementation in the framework, this would be better contributed to the spring-batch-exetensions repository if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.