package couchdb.changes
import akka.actor._
import spray.http.Uri
object LoggingActor extends Actor with ActorLogging {
log.info("Initializing LoggingActor")
def receive: Receive = {
case x => log.info("Received {}", x)
}
}
object Example extends App {
val system = ActorSystem()
val stream = system.actorOf(Props(new ChangesStreamActor(
system.actorOf(Props(LoggingActor)))))
stream ! Uri("http://localhost:5984/example/_changes").withQuery(
"feed" -> "continuous"
, "heartbeat" -> "5000"
, "include_docs" -> "true"
)
}
// vim: set ts=2 sw=2 et: