Skip to content

Commit

Permalink
Fix update metadata and async push
Browse files Browse the repository at this point in the history
  • Loading branch information
thspinto committed May 22, 2018
1 parent 2cc534f commit 6bff689
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quintoandar-kafka",
"version": "0.0.9",
"version": "0.0.10",
"description": "Default Kafka NodeJS lib for QuintoAndar",
"main": "src/main.js",
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/node-kafka-consumer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class KafkaConsumer {
this.configs.autoCommit = false;
_.defaults(this.configs, { sessionTimeout: 15000 });
_.defaults(this.configs, { protocol: ['roundrobin'] });
_.defaults(this.configs, { asyncPush: false });
_.defaults(this.configs, { asyncPush: true });
_.defaults(this.configs, { fromOffset: 'latest' });
_.defaults(this.configs, { outOfRangeOffset: 'latest' });
_.defaults(this.configs, { fetchMaxBytes: 1024 * 1024 });
Expand Down Expand Up @@ -45,7 +45,7 @@ class KafkaConsumer {
this.consumer.commit(msg, true);
});
});
setInterval(this.refreshMetadata.bind(this), this.updateMetadata);
setInterval(this.refreshMetadata.bind(this), this.configs.updateMetadata);
logger.info('ConsumerGroupStream started');
}

Expand Down
2 changes: 1 addition & 1 deletion tests/node-kafka-consumer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('Kafka Consumer', () => {
autoCommit: false,
sessionTimeout: 15000,
protocol: ['roundrobin'],
asyncPush: false,
asyncPush: true,
fromOffset: 'latest',
outOfRangeOffset: 'latest',
fetchMaxBytes: 1024 * 1024,
Expand Down

0 comments on commit 6bff689

Please sign in to comment.