[ 
https://issues.apache.org/jira/browse/CAMEL-13501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16839143#comment-16839143
 ] 

Claus Ibsen commented on CAMEL-13501:
-------------------------------------

We could consider having when you set route auto startup = false, to let the 
consumer/producers of components etc only do init so they are only initialized, 
and then when you start the route, they are started. Then they are warmed up 
even more. Today the consumers are not warmedup. But on the other side the 
producers are started. What we want for producers is also to only initialize 
them, and start them when the route starts.

But to make this easier, we could have when auto startup = false
- routes and all its consumers, producers, eips are warmed up with only init
- start is called on the route, then all its producers, eips are started, and 
the consumer started last.

Then they have the same lifecycle. And allows safely to warmup and initalize 
resources. 



> Component should move initialization logic to doInit instead of doStart
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-13501
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13501
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Claus Ibsen
>            Priority: Major
>             Fix For: 3.0.0
>
>
> We should move logic that can be executed once during build/compile phase for 
> components to doInit, and then leave doStart to when components need to setup 
> live connections to remote systems etc.
> In doInit we can do internal init such as setup a thread pool or other stuff 
> they need.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to