How to stream records from a web service in a spring batch like JDBCCursorItemReader -
use case read large set of data rest web service, list of million objects, process them , write them somewhere. issue not want read data web service in 1 go. read subset of total results web service,a few records/objects @ time, not run risk of running out of memory reading data in 1 go spring batch reader. there way this? spring batch provides itemreaderadapter
reading external service (as opposed database or flat file) nothing special except giving support delegating calls. jdbccursoritemreader
reads, or rather streams db instead of reading @ once.
http://forum.spring.io/forum/spring-projects/batch/73040-default-webservice-reader-implementation here talk lack of reader web services.
https://stackoverflow.com/a/25025898/153940 mentions how spring batch doesn't have web service itemreader
you correct in spring batch not provide web service itemreader
implementation. reason definition of "web service" bit vague able standardize reader around.
that being said, implement own quite extending abstractpagingitemreader
(http://docs.spring.io/spring-batch/trunk/apidocs/org/springframework/batch/item/database/abstractpagingitemreader.html) , adding logic appropriate web service there.
Comments
Post a Comment