An open API service indexing awesome lists of open source software.

https://github.com/charconstpointer/rubens

YAMB
https://github.com/charconstpointer/rubens

bus distributed message messaging microservices rubens signalr

Last synced: about 2 months ago
JSON representation

YAMB

Awesome Lists containing this project

README

          

# Rubens (ruːbənz)
## 📮 Basic pub-sub functionality on top of SignalR
#### Other communication methods possibly coming in the future (gRPC, AMQP)
![](https://i.imgur.com/5qo5aQ0.png)
##### PW 💗
### 🐕‍🦺 Rubens' server https://hub.docker.com/r/controllerbase/rubens
To run it
```
docker run -p 4444:4444 controllerbase/rubens
```
### 🧙🏽‍♂️ With Microsoft's DI
#### 🥴 Register
```
services.AddRubens(options =>
{
options.ConnectionString = "http://localhost:4444";
});
```
##### In Memory Bus
```
services.AddRubens(options =>
{
options.UseInMemoryBus = true;
});
```
#### 🏌🏽‍♀️ Run
```
app.UseRubens(x =>
{
x.Subscribe(@event =>
{
Console.WriteLine($">{@event}");
Console.WriteLine($"<{@event}");
});
//With IEventHandler
x.Subscribe();
});
```
### ⚙️ With Manual Wiring
```
var cfg = new RubensConfiguration{ConnectionString = "https://localhost:5001"};
var ctl = new ControlPlane(cfg);
var logger = new Logger(new LoggerFactory());
var bus = new Bus(ctl, logger:logger);
await bus.Subscribe(@event => Console.WriteLine(@event.Body));
```
### 🥳 Publishing events
```
await _bus.Publish(new Event());
```
where Event : IEvent