Announcement Announcement Module
Collapse
No announcement yet.
How to stop a poller in inbound channel adapter? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to stop a poller in inbound channel adapter?

    We are using an inbound-channel-adapter with poller configuration to work as a trigger to ftp-outbound-gateway to list and download the files from remote directory. But we want to provide timeout to our application that will stop that trigger( but not the whole application context) after that time so that the ftp-outbound-gateway would stop working but if some files are being downloaded then that should not be affected. Can Delayer be used in that case or how the poller in the inbound-channel-adapter could be stopped?

  • #2
    Hi!

    or how the poller in the inbound-channel-adapter could be stopped
    It's easy:
    HTML Code:
    <inbound-channel-adapter id="myInboundAdapter" expression="''" channel="inputChannel">
    	<poller trigger="someTrigger"/>
    </inbound-channel-adapter>
    So, then you can invoke start/stop on whole endpoint (<inbound-channel-adapter>) via its "id" as a bean from application context:
    Code:
    ...
    @Autowired
    Lifecycle myInboundAdapter
    ...
    this.myInboundAdapter.stop()
    HTH,
    Artem

    Comment

    Working...
    X