Skip to content

Instantly share code, notes, and snippets.

@reidev275
Last active August 29, 2015 14:04
Show Gist options
  • Save reidev275/cface92b746703840780 to your computer and use it in GitHub Desktop.
Save reidev275/cface92b746703840780 to your computer and use it in GitHub Desktop.
public static class RabbitMQ
{
public static IBus Bus { get; private set; }
static RabbitMQ()
{
Bus = RabbitHutch.CreateBus("host=localhost");
}
}
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