No! Calling end()
to "end" a Camel route is not a best practice and won't yield any functional benefits.
For common ProcessorDefinition functions like to()
, bean()
or log()
it simply leads to a call to the endParent() method, which as one can see from the Camel source code, does very little:
public ProcessorDefinition<?> endParent() {
return this;
}
The call to end() is required, once you have called processor definitions that start their own block and most prominently includes TryDefinitions
aka doTry()
and ChoiceDefinitions
aka choice()
, but also well know functions like split(), loadBalance(), onCompletion()
or recipientList()
.