Hello,
During application startup we create a lot of routes of which some endpoints
(ftp, sftp and ftps, etc) can be offline. This can be quite blocking because of
connection timeouts and reconnect attempts. Currently this is 3x 45000ms. What
I am looking for is a way to start multiple routes simultaneous, or make it
less blocking. Camel 2.17.4 is used.
Because of the endpoint autoCreate it will try to create a connection
immediately during startup. We would rather not disable that option, also the
timeout and attempts are fine during normal operations, but not during startup.
Wouldn't that logic be better off with the first poll?
Because of all the synchronized methods in the DefaultCamelContext we have
found it difficult to start multiple routes simultaneous. Is there anyone with
an idea about starting the application faster? We already tried
autoStartup=false and then manually starting them but our issue stays the same.
Here is a stacktrace:
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:182)
at org.apache.commons.net.SocketClient.connect(SocketClient.java:203)
at
org.apache.camel.component.file.remote.FtpOperations.connect(FtpOperations.java:96)
at
org.apache.camel.component.file.remote.RemoteFileConsumer.connectIfNecessary(RemoteFileConsumer.java:203)
at
org.apache.camel.component.file.remote.FtpConsumer.doStart(FtpConsumer.java:55)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3275)
at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:3569)
at
org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3505)
at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3435)
at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3448)
at
org.apache.camel.impl.DefaultCamelContext.startRouteService(DefaultCamelContext.java:3325)
at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:976)
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3301)
at
org.apache.camel.impl.DefaultCamelContext.addRouteDefinitions(DefaultCamelContext.java:908)
at
org.apache.camel.impl.DefaultCamelContext.addRouteDefinition(DefaultCamelContext.java:913)
This E-mail is for the sole use of the intended recipient and may contain
confidential and/or privileged material. Any reading, review, reliance,
distribution, printing or storage of this E-mail by others than the intended
recipient is strictly prohibited without the express permission of the sender.
If you are not the intended recipient, please contact the sender immediately
and delete all copies from your mailbox and other archives.