Hangfire.SqlServer.RabbitMq
Hangfire.SqlServer.RabbitMq copied to clipboard
EasyNetQ library
To prevent code duplication in Hangfire.SqlServer.RabbitMq and in tests wrapper for EventingBasicConsumer should be written. A ready solution exists: EasyNetQ library (https://github.com/EasyNetQ/EasyNetQ/wiki/Quick-Start):
static void Main(string[] args)
{
using (var bus = RabbitHutch.CreateBus("host=localhost"))
{
bus.Subscribe<TextMessage>("test", HandleTextMessage);
Console.WriteLine("Listening for messages. Hit <return> to quit.");
Console.ReadLine();
}
}
static void HandleTextMessage(TextMessage textMessage)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Got message: {0}", textMessage.Text);
Console.ResetColor();
}
What do you think about adding it's reference to the solution and usage?
@odinserj , Is this thread and totally this project (Hangfire.SqlServer.RabbitMq) open and under development?