Rebus Circuit Breaker Implementation?

Viewed 127

I have been working quite a bit with Rebus lately and so far it has been great.

One area of concern is when we have thousands or hundreds of thousands of messages that are being processed and a dependent service, like the database or RabbitMQ, is down.

In that case, we do not want all of the messages in the error queue. I would like to know if Rebus has any kind of built-in circuit-breaker mechanism? Something like I reach a 10% failure rate threshold over a period of 60 seconds and want to disable the endpoint for a set period of time in case the infrastructure is down and needs to recover.

2 Answers

Dude, that's a brilliant idea!

It could even be made without touching the internals of Rebus, simply by hooking a decorator into the IErrorHandler, which would detect the error rate and then set the number of workers to 0 for a while.

If it's something you're interested in, you can raise it as an issue on GitHub.

Related