nats-io / nats.ts

TypeScript Node.js client for NATS, the cloud native messaging system
https://www.nats.io
Apache License 2.0
178 stars 13 forks source link

Jitter #90

Closed aricart closed 4 years ago

aricart commented 4 years ago

Added the ability to specify jitter parameters. The jitter is an extra amount of time that is random up to specified value which is added to the standard reconnectTimeWait. Two values are exposed reconnectJitter and reconnectJitterTLS. In addition, there's a reconnectDelayHandler where a client can specify a value (in milliseconds) that will be used for delay between reconnects.