Last active
August 29, 2015 14:04
-
-
Save reidev275/cface92b746703840780 to your computer and use it in GitHub Desktop.
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
public static class RabbitMQ | |
{ | |
public static IBus Bus { get; private set; } | |
static RabbitMQ() | |
{ | |
Bus = RabbitHutch.CreateBus("host=localhost"); | |
} | |
} |
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
public class ImagesController : ApiController | |
{ | |
public async Task Post(ImageProcessRequest image) | |
{ | |
await RabbitMQ.Bus.PublishAsync(image); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment