Created
March 24, 2015 14:13
-
-
Save Danthar/5f7e27956707de633431 to your computer and use it in GitHub Desktop.
Consume RabbitMq messages with Akka
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
system = ActorSystem.Create("myAkkaSystem"); | |
var coordinator = system.ActorOf<WorkCoordinatorActor>("workcoordinator"); | |
bus = RabbitHutch.CreateBus("host=localhost"); | |
bus.Subscribe<CdrRecieved>("<mysubId>", message => { | |
var result = coordinator.Ask<WorkCompleted>(new StartWorkFor() {Details = message}).Result; | |
//do something with it | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment