Microservices SDK for .NET applications
As seen on visualstudiomagazine.com.
Microservices are groupings of lightweight services, interconnected, although independent of each other, without direct coupling or dependency. Microservices allow flexibility in terms of infrastructure; application traffic is routed to collections of services that may be distributed across CPU, disk, machine and network as opposed to a single monolithic platform designed to manage all traffic.
Click here for an in-depth tutorial on building Microservices using this framework.
Installation
PM> Install-Package Daishi.AMQP
Sample Code
Connect to RabbitMQ
var adapter = RabbitMQAdapter.Instance;
adapter.Init("hostName", 1234, "userName", "password", 50);
adapter.Connect();
Send a Message
var message = "Hello, World!";
adapter.Publish(message, "queueName");
Retrieve a Message
string output;
BasicDeliverEventArgs eventArgs;
adapter.TryGetNextMessage("queueName", out output, out eventArgs, 50);
Continuously Poll for Messages
var consumer = new RabbitMQConsumerCatchAll("queueName", 10);
adapter.ConsumeAsync(consumer);
Console.ReadLine();
adapter.StopConsumingAsync(consumer);
Contact the Developer
Please reach out and contact me for questions, suggestions, or to just talk tech in general.