circuitBreaker — trips after N consecutive failures, rejects fast while open.
Get the current circuit state for an action.
Manually reset a circuit.
bus.use(circuitBreaker({ threshold: 3, resetTimeout: 10_000, actions: ['api*'] })); Copy
bus.use(circuitBreaker({ threshold: 3, resetTimeout: 10_000, actions: ['api*'] }));
circuitBreaker — trips after N consecutive failures, rejects fast while open.