Reputation: 3798
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.
Upvotes: 4
Views: 169
Reputation: 2201
Seems like there is a plugin available
https://github.com/rebus-org/Rebus.CircuitBreaker
Disclaimer
I was just searching for the same thing and I have no relation to the plugin itself. All credits go to the authors.
Upvotes: 1
Reputation: 18628
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. 🙂
Upvotes: 3