rateLimit — per-action sliding window rate limiter. Unlike throttle (which delays execution), rateLimit rejects immediately when the limit is exceeded.
bus.use(rateLimit({ max: 5, window: 1000, actions: ['api*'] })); Copy
bus.use(rateLimit({ max: 5, window: 1000, actions: ['api*'] }));
rateLimit — per-action sliding window rate limiter. Unlike throttle (which delays execution), rateLimit rejects immediately when the limit is exceeded.