Skip to content

A lightweight .NET message queue system with QoS support, built on top of MongoDb.

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.md
Notifications You must be signed in to change notification settings

outmatic/RedCapped

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Red Capped

A lightweight .NET message queue system with QoS support, built on top of MongoDb.

Build status

Define the message payload

public class Order
{
  public int Id { get; set; }
  public decimal Amount { get; set; }
  ...
}

How to publish messages

// create the queues manager
var factory = new QueueFactory("mongodb://localhost", "mydb");
// create the queue
var queue = await factory.CreateQueue<Order>(queueName, 256*1024*1024);
// publish!
await queue.PublishAsync(new Order { Id = 123, Amount = 120M });

How to subscribe and receive messages

// create the queues manager
var factory = new QueueFactory("mongodb://localhost", "mydb");
// create the queue
var queue = await factory.CreateQueue<Order>(queueName, 256*1024*1024);
// subscribe
queue.Subscribe(order =>
{
  Debug.WriteLine("Order #{0} amount {1}", order.Id, order.Amount);
  // return true if the message was handled, otherwise it will be requeued
  return true;
});

About

A lightweight .NET message queue system with QoS support, built on top of MongoDb.

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages