PaulHatch / Rebus.Redis

Redis driver for Rebus
MIT License
2 stars 0 forks source link

Configurers for Subscriptions and transports missing? #1

Open BostrongLonsec opened 5 months ago

BostrongLonsec commented 5 months ago

Hi @PaulHatch,

First off thanks for making this little library of yours open source : )

For my usecase specifically, i would like to try and use your library as a Rebus provider within my own implementation of the Elsa 2.0 framework.

Elsa is workflow framework which utilizes Rebus under the hood for communication between worker nodes and allows you to plugin different Rebus providers (i.e. RabbitMQ, Postgres, SQL Server .. any Rebus provider).

In my solution I already make use of Postgres and Redis so I really wanted to try and leverage these existing infrastructure components rather than introduce a RabbitMQ broker as well.

I have tried with Rebus.Postgres provider (a different library) but it appears to create excessive DB connections which is not ideal for me. I was unable to work out the underlying reason as to why so many DB connections were made this library. I then came across your library, which based on my searches appears to be the only Rebus Redis provider out there.

As you can see from the below image, the Rebus Postgres provider allows you configure the Transport usage, Subscription storage and Saga storage in the manner displayed in the image (code block bracketed in red).

However as far as I can tell this Rebus.Redis library does not have all those configurer options available (code bracketed in yellow).

image

I am very much a newby when it comes to rebus and so may not have understood fully whether your Rebus Redis library can be used in this manner.

Are you able to shed any light as to whether this would be possible at all?

Many Thanks, Brett

BostrongLonsec commented 5 months ago

A little extra info about how Rebus is used within a multi-node Elsa workflow implementation ... https://v2.elsaworkflows.io/docs/hosting/distributed-hosting

PaulHatch commented 5 months ago

Hey @BostrongLonsec, Thanks, yes I had planned to add a transport implementation at some point, but have been holding off until someone expressed interest as I am using RabbitMQ transports myself.

I think Rebus is a great library. I spent a lot of time (months) looking at alternatives including sinking a ton of time and effort into MassTransit, but I could not get my use case working as it's poorly documented and seems a bit over engineered, the design seems to have followed a rather meandering path and if you weren't following the entire journey it's difficult to work out how the parts are supposed to work. The other event bus libraries available are either commercial licensed (NServiceBus) or were a bit too basic or immature for what I needed.

Rebus on the other hand I had working in a couple of hours, and it has been relatively easy to extend.

There are a few Redis implementations out there, but the ones I have seen work in a similar way to the DB ones, writing events to one of the storage types and polling. The newer streams API is a good fit for transport, and it is already used here for the outbox. Definitely could be added here.