Hi there, I'm not entirely sure what the problem is, would you mind including some more logs or explain the tested scenario in more detail?
Thanks! -- Konrad On Sun, Feb 15, 2015 at 9:39 PM, hfaouaz <[email protected]> wrote: > > Hello, > I am trying to leverage akka to initiate one single camel route > execution, as such once the actor gets a message, it initiates the camel > route, and upon completion, shutdown the route. Example below, though I am > not able to achieve it. Either the camel route stays and if I try to shut > it down, the route is never complete. Any ideas I would appreciate... > > class CamelRouteExecutor extends Actor with ActorLogging { > > implicit val system = context.system > > val camel = CamelExtension(system) > > def receive = { > > case work:Any => > > val route = work.asInstanceOf[java.lang.String] > log.debug("Executing camel route {}", route) > val is = new ByteArrayInputStream(route.toString().getBytes()) > val routesDef = camel.context.loadRoutesDefinition(is) > camel.context.addRouteDefinition(routesDef.getRoutes.get(0)) > log.debug("stopping route Id {} from camel context", > routesDef.getRoutes.get(0).getId) > camel.context.stopRoute(routesDef.getRoutes.get(0).getId) > camel.context.removeRoute(routesDef.getRoutes.get(0).getId) > > sender() ! Worker.WorkComplete("work status: ") > > > case _ => > log.warning("got a message, which I don't understand") > } > } > > -- > >>>>>>>>>> Read the docs: http://akka.io/docs/ > >>>>>>>>>> Check the FAQ: > http://doc.akka.io/docs/akka/current/additional/faq.html > >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user > --- > You received this message because you are subscribed to the Google Groups > "Akka User List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/akka-user. > For more options, visit https://groups.google.com/d/optout. > -- Akka Team Typesafe - The software stack for applications that scale Blog: letitcrash.com Twitter: @akkateam -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
