Announcement Announcement Module
No announcement yet.
split-flow processes executed as asyncTaskExecutor doesn't work a throttle-limit? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • split-flow processes executed as asyncTaskExecutor doesn't work a throttle-limit?

    on my project, when i tried several flows in <split/>, found parraller processing do not work through throttle-limit.
    it looks like whole processes(flows) are working concurrently in a batch log.

    i am trying to execute 10 more flows in a split, but if whole flows are working concurrently,
    it could cause a db-connection pool issues.

    So is there anyway to adopt a throttle-limit in a split-flow asyncTaskExecutor?

    <split id="split01" task-executor="asyncTaskExecutor">
    		<step id="STEP30" parent="flowControlStep">
    			<tasklet ref="TSKLET01"/>
    		<step id="STEP31" parent="flowControlStep">
    			<tasklet ref="TSKLET02"/>
    Last edited by bumzpark; Jul 13th, 2012, 03:50 AM.

  • #2
    What version of Spring batch?
    Can I assume your attempting to throttle a SimpleAsyncTaskExecutor?
    If so, can you confirm that the Throttle is active? Maybe log out isThrottleActive() just to confirm the throttle is being applied.



    • #3
      my project is using spring-batch-core-2.1.5.RELEASE.jar, org.springframework.core-3.0.2.RELEASE.jar.
      also asyncTaskExecutor is defined as
      <bean id="asyncTaskExecutor" class="org.springframework.core.task.SimpleAsyncTa skExecutor">

      So I added property to my job.xml as below

      <bean id="asyncTaskExecutorSplit" class="org.springframework.core.task.SimpleAsyncTa skExecutor">
      <property name="concurrencyLimit" value="4"/>
      <property name="threadNamePrefix" value="AsyncThread-"/>
      <property name="daemon" value="true"/>

      it works fine now,
      thanx visualjeff for reminding...
      Last edited by bumzpark; Jul 16th, 2012, 12:39 AM.