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
- Host: GitHub
- URL: https://github.com/charconstpointer/rubens
- Owner: charconstpointer
- Created: 2020-09-10T15:04:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-20T21:29:18.000Z (over 5 years ago)
- Last Synced: 2024-12-27T09:29:55.139Z (12 months ago)
- Topics: bus, distributed, message, messaging, microservices, rubens, signalr
- Language: C#
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
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)

##### 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