If you want the CODE to do it, then here it is. It took me a bit to really figure out what's going on, because there are a TON of examples, and it's not clear what they are all doing or how to put it all together. Turns out it was more simple than I thought:
package com.nthalk.akkatest
import akka.actor.Actor.actorOf
import akka.actor.Actor
import akka.camel.Consumer
import akka.camel.Message
import akka.camel.CamelServiceManager
class MyActor extends Actor with Consumer {
def endpointUri = "jetty:http://localhost:8877/"
def receive = {
case msg: Message => { self.reply("State Rest Service: Achieved") }
case _ => { self.reply("Really, no message?") }
}
}
object App extends scala.App {
actorOf[MyActor].start
CamelServiceManager.startCamelService
}
And my build.sbt looks like:
organization := "com.nthalk"
name := "akkatest"
version := "0.1.0"
resolvers +=
"Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies ++= Seq(
"org.apache.camel" % "camel-jetty" % "2.9.0",
"se.scalablesolutions.akka" % "akka-camel" % "1.3.1"
)
Hope this helps!