nodefluent / node-sinek

:tophat: Most advanced high level Node.js Kafka client
MIT License
290 stars 52 forks source link

setInterval in native Kafka uses wrong delay #103

Closed analytik closed 5 years ago

analytik commented 5 years ago

In node-sinek-master/lib/librdkafka/NConsumer.js

    lagFetchInterval = lagFetchInterval || 1e6 * 60 * 3; //3 minutes

    this._analyticsIntv = setInterval(this._runAnalytics.bind(this), analyticsInterval);
    this._lagCheckIntv = setInterval(this._runLagCheck.bind(this), lagFetchInterval);

setInterval and setTimeout use milliseconds, not microseconds. Using a parameter like 45000000 will mean "run this every 45000 seconds".

krystianity commented 5 years ago

fixed in sinek@6.27.1