Our project has similar requirements - in addition to parameterizing the SFTP connection at runtime, not just at route declaration-time. I was led to believe that, generally, consumers can't be parameterized at runtime, so I made a few attempts at creating my own custom component to do SFTP with parameters passed in at runtime, triggered by Quartz cron trigger. This worked, but didn't get automatically wrapped in JMX wrappers, plus other clunky issues.
I ended up having the quartz/cron trigger send the parameters to a custom processor which creates a route at runtime, starting with an SFTP consumer - plus a background thread that defines the poll time duration, after which, the thread stops the route, then removes it. This all works for us now, including multiple, concurrent connections (well, only two simultaneous tested so far) You might want to try an approach like that. On Tue, Jun 25, 2013 at 11:21 AM, mdo <[email protected]> wrote: > Claus Ibsen-2 wrote >> Use stop instead of suspend. > > I know that stopping the route does shut down the endpoints. But we changed > to suspend/resume a month ago because we noticed that stop/restart leaks > threads in GlassFish. If I did stop the route I would have to remove and > recreate it each time Quartz fires. This would also knock down my whole > approach of initially setting up routes on application startup. > > At the moment I'm looking into endpoint options, something like: > serverAliveInterval 900 > serverAliveCountMax 0 > > This idea was inspired by http://serverfault.com/a/450916 > > But this doesn't seem to work neither. JSCH goes nuts and disconnects right > before logging in and "SSH_MSG_KEXDH_INIT sent" should get logged. > > Regards, mdo. > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/SFTP-disconnect-on-route-suspend-tp5734742p5734744.html > Sent from the Camel - Users mailing list archive at Nabble.com.
