Results 1 to 2 of 2

Thread: Throttling item processing

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    6

    Default Throttling item processing

    Hello,

    I have a read-write batch job that reads items from a database table and calls a web service (as the writer part).
    As the calls to the web service eventually overload the remote server, I am searching for a solution where I will be able to throttle the service calls.
    By throttling I mean delaying the next item's processing after each item's write.
    Alternatively, a delay could be placed before or after each read.
    I tried to find a workaround using JMS but could not come up with any solution.

    Any ideas are welcome

    Thanks

    Daniel

  2. #2
    Join Date
    Sep 2008
    Location
    Chicagoland, IL
    Posts
    348

    Default

    Well, throttling itself isn't necessarily the same as reading the next item once the current one has been written. To delay reading the next item until the current one has been written, just change your commit-interval to 1.

    However, there there is no throttling available within the framework when running in a single threaded model.
    Michael Minella
    Spring Batch Lead
    Author - Pro Spring Batch
    http://www.michaelminella.com
    Twitter: @MichaelMinella

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •