Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scheduled task response to channel spring-integration

How can I pass a response from task:scheduled in spring-intgeration to a channel?

<task:scheduled-tasks>
    <task:scheduled ref="loadFruits" method="loadFruits" cron="0/5 * * * * *"/>
</task:scheduled-tasks>  
<bean id="loadFruits" class="com.data.taskschedulers.LoadFruits"/>
<int:channel id="outboundComplexChannel"/>

Now can I some how read the return response of loadFruits method to a channel outboundComplexChannel

Please provide if any way of doing this

Thanks

like image 302
Chakradhar K Avatar asked Jan 24 '26 04:01

Chakradhar K


1 Answers

Use an inbound-channel-adapter instead

<int:inbound-channel-adapter ref="loadfruits" method="loadFruits"
        channel="outboundComplexChannel">
    <int:poller cron="0/5 * * * * *"/>
</int:inbound-channel-adapter>
like image 123
Gary Russell Avatar answered Jan 26 '26 17:01

Gary Russell