Created
March 8, 2012 02:32
-
-
Save logicbomb/1998166 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // HOST INIT | |
| Bus.Initialize(sbc => | |
| { | |
| sbc.SetNetwork("my-technologies"); | |
| sbc.UseRabbitMq(); | |
| sbc.ReceiveFrom("rabbitmq://localhost/command_host"); | |
| sbc.SetPurgeOnStartup(true); | |
| sbc.Subscribe( | |
| s => | |
| { | |
| registerCommandProcessors(container); | |
| s.LoadFrom(_processors); | |
| s.Handler<DiagnosticCommand>(msg => | |
| { | |
| Bus.Instance.MessageContext<DiagnosticCommand>().Respond(new DiagnosticResponse()); | |
| this.Debug("Responding to DiagnosticCommand Request from {0}", msg.IssuedBy); | |
| }); | |
| }); | |
| }); | |
| // PUBLISHER INIT | |
| Bus.Initialize(sbc => | |
| { | |
| sbc.SetNetwork("my-technologies"); | |
| sbc.UseRabbitMq(); | |
| sbc.ReceiveFrom("rabbitmq://localhost/publisher"); | |
| sbc.SetPurgeOnStartup(true); | |
| sbc.Validate(); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment