java - Spring integration - how to figure out that processing is finished -
i have following flow defined in spring integration:
- read , remove message (with web service request) given directory
- transform string
- send web service request message
the process definition looks like
integrationflows .from(inboundadapter(getdirectory())) .transform(filetostring()) .handle(sendrequesttows) .get(); the number of messages in given directory fixed , inform user when messages has been processes.
do have idea how can figure out flow "has been finished"?
filereadingmessagesource returns null when there no more files in directory. need custom implementation of filereadingmessagesource send different message when directory empty or maybe there better solution this...
subclassing filereadingmessagesource detect null work; or add custom message source advice poller - see smart polling.
the smart poller work people using xml configuration too, it's not easy use custom messagesource.
Comments
Post a Comment