Spring XD Processing files -
we have requirement need process multiple files folder (each file having 50k-100k records) , after doing calculation store data in database. once content of file processed need trigger second stream further processing.
the way have designed solution is
file reader -- file splitter -- processor -- re-sequencer (release strategy per record) -- sink (load data in database)
the issue above design re-sequencer , sink not able figure out if contents of file stored in database without cannot invoke second stream.
we have done benchmark activities aggregator , seems slower re-sequencer. there known performance issues aggregator? there serious performance degradation if have release strategy of releasing when data re-sequencer
thanks, jayadeep
processor 1 - splits lines
processor 2 - calculation on each message <int:service-activator input-channel="input" ref="singlepointcalculator" method="onmessage"/> <bean id="singlepointcalculator" class="com.processor.singlepointcalculator"> <constructor-arg index="0" ref="output"/> </bean> sink <int:resequencer input-channel='input' output-channel='reseqchannel' release-strategy-expression="size() == 1" ></int:resequencer> <int:transformer ref="maptransformer" input-channel="reseqchannel" output-channel="mapchannel"/> <bean id="maptransformer" class="com.sink.maptransformer"> <property name="columns" value=" side,value" /> </bean> <int-jdbc:outbound-channel-adapter data-source="datasource" channel="mapchannel" query=" "> </int-jdbc:outbound-channel-adapter> sink using aggregator <int:aggregator input-channel='input' output-channel='aggchannel' " ></int:aggregator > <int:transformer ref="maptransformer" input-channel="aggchannel" output-channel="mapchannel"/> <bean id="maptransformer" class="com.sink.maptransformer"> <property name="columns" value=" side,value" /> </bean> <int-jdbc:outbound-channel-adapter data-source="datasource" channel="mapchannel" query=" "> </int-jdbc:outbound-channel-adapter>
Comments
Post a Comment