Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.13.2
-
None
-
Unknown
Description
Given this route:
MyRoute.scala
import org.apache.camel.main.Main import org.apache.camel.scala.dsl.builder.{RouteBuilder, RouteBuilderSupport} class MyRoute extends RouteBuilder { "direct:input" ==> { id("my-route") to("mock:output") } } object MyRoute extends RouteBuilderSupport { def main(args: Array[String]) { val main = new Main() main.enableHangupSupport main.addRouteBuilder(new MyRoute) main.run } }
On startup we can see a my-route id:
[main] DefaultCamelContext INFO Route: my-route started and consuming from: Endpoint[direct://input]
Adding an onException definition to the route:
handle[FileNotFoundException] {
to("mock:exception")
}.handled
On startup we can see a route1 id:
[main] DefaultCamelContext INFO Route: route1 started and consuming from: Endpoint[direct://input]