Any Outbound Gateway is an event-driven endpoint. It is not a beginning of the flow like it would be, for example, with the <int-sftp:inbound-channel-adapter>
.
If really would like to trigger such a gateway in a periodic manner, you would simulate it via "void" inbound channel adapter:
<int:inbound-channel-adapter channel="requestChannel" expression="''">
<int:poller fixed-delay="10000" max-messages-per-poll="1"/>
</int:inbound-channel-adapter>
The requestChannel
must not be a queue channel any more. The message with empty payload is going to be sent to this channel on each poll and your gateway is going to perform its logic. However I see that you use expression="payload"
for the remote directory to perform LS
command. So, or you need to configure that <int:inbound-channel-adapter >
to produce a message with that remote dir payload or just have a static expression for it on the gateway, e.g. expression="'/myRemoteDir'"
.
Either way, but only with a polling channel adapter in the beginning of the flow. Otherwise a gateway is not going to be triggered periodically.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…