Skip to content

Instantly share code, notes, and snippets.

@sstone
Created August 21, 2012 19:24
Show Gist options
  • Save sstone/3418512 to your computer and use it in GitHub Desktop.
Save sstone/3418512 to your computer and use it in GitHub Desktop.
proxy client
val system = ActorSystem("MySystem")
val connFactory = new ConnectionFactory()
connFactory.setHost("rabbitmq")
val conn = system.actorOf(
Props(new ConnectionOwner(connFactory)),
name = "conn")
val client = ConnectionOwner.createActor(
conn,
Props(new RpcClient()),
5 second)
waitForConnection(system, client).await()
val proxy = system.actorOf(
Props(
new AmqpProxy.ProxyClient(
client,
"amq.direct",
"calculator",
JsonSerializer
)
),
name = "proxy"
)
compute(proxy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment