This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class AddRequest(x:Int, y:Int) | |
case class AddResponse(sum:Int) | |
class Calculator extends Actor { | |
protected def receive = { | |
case AddRequest(a, b) => sender ! AddResponse(a + b) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.aphelia | |
import akka.actor.{Actor, ActorRef} | |
import akka.pattern.ask | |
import akka.serialization.Serializer | |
import amqp.Amqp.{Publish, Delivery} | |
import amqp.{RpcClient, RpcServer} | |
import amqp.RpcServer.ProcessResult | |
import com.rabbitmq.client.AMQP.BasicProperties | |
import akka.dispatch.{Future, Await} |
NewerOlder