rebus-org / Rebus.RabbitMq

:bus: RabbitMQ transport for Rebus
https://mookid.dk/category/rebus
Other
62 stars 44 forks source link

Add support for rabbitmq-delayed-message-exchange #100

Closed ldeluigi closed 1 year ago

ldeluigi commented 1 year ago

Reading #56, I'm thinking that you should add (opt-in) support for the https://github.com/rabbitmq/rabbitmq-delayed-message-exchange plugin. At the present time, it is considered stable and is officially mantained by RabbitMq

mookid8000 commented 1 year ago

Rebus' RabbitMQ can already work with the delayed message exchange plugin, it just requires a little bit of manual work.

You can see a small example here: https://github.com/rebus-org/Rebus.RabbitMq/blob/master/Rebus.RabbitMq.Tests/Examples/CanSendDelayedMessageWithDelayedMessageExchangePlugin.cs#L57-L88

While working on the example I started sketching out a future version of the transport, which will add support for going

services.AddRebus(
    configure => configure
        .Transport(t => t.UseRabbitMq(...))
        .Timeouts(t => t.UseDelayedMessageExchange("RebusDelayed"))
);

which will hook into all the right places to enable

await bus.Defer(TimeSpan.FromSeconds(10), whatever);

But now it's Christmas 🎄 🎅 and I've stashed my work, so I'll continue some time in a couple of weeks probably (or tomorrow, maybe...)

mookid8000 commented 1 year ago

OK I already added the feature as described above. It's available in Rebus.RabbitMq 7.4.6 which is on NuGet.org now