0

I am setting up new molecular project and trying to config circuit breaker in my project under molecular.config.js and set windowOpen to 6 sec. But when i do any operation and throw an error. Circuit doesn't break down. I am not able to find any solution for this.

Need Help

1 Answers1

0

Here you can see the parameters: https://moleculer.services/docs/0.13/fault-tolerance.html#Settings

The default values don't trip the CB after the first error. E.g. the number of requests should reach the minRequestCount. If you want to trip the CB after the first error, set threshold: 1 & minRequestCount: 0

Icebob
  • 1,132
  • 7
  • 14
  • when i checked in module the status inside trip method in circuit-breaker.js, it shows me open but when i again call the service then it again passes which i need to block. I am not able to block the request at current service. – Sandeep Gupta Jan 18 '19 at 07:10