Skip to content

Commit

Permalink
test consumer的配置字段 consumerOption 改为 options
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnApache committed Jan 21, 2019
1 parent ca9c31d commit 67697b0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ exports.kafkaNode = {
consumerOption: [{
groupId: 'group1', // consumerGroup's groupId
topics: [ 'testTopic1' ], // topics under the same consumer group
options: {}, // relevant configuration for each consumer group, more documentation please visit kafka-node
options: {
fetchMaxWaitMs: 100,
fetchMinBytes: 1,
fetchMaxBytes: 1024 * 1024,
}, // relevant configuration for each consumer group, more documentation please visit kafka-node
}, {
groupId: 'group2',
topics: [ 'testTopic2' ],
Expand Down
8 changes: 6 additions & 2 deletions demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@ app.config.kafkaNode = {
consumerOption: [{
groupId: 'group1',
topics: [ 'testTopic1' ],
consumerOption: {},
options: {
fetchMaxWaitMs: 100,
fetchMinBytes: 1,
fetchMaxBytes: 1024 * 1024,
}, // 每个消费组对应的相关 consumerGroup 配置
}, {
groupId: 'group2',
topics: [ 'testTopic2' ],
consumerOption: {},
options: {},
}, {
groupId: 'group3',
topics: [ 'testTopic3' ],
Expand Down
8 changes: 5 additions & 3 deletions test/fixtures/apps/kafka-node-test/config/config.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ exports.kafkaNode = {
consumerOption: [{
groupId: 'group1',
topics: [ 'testTopic1' ],
consumerOption: {
options: {
fetchMaxWaitMs: 100,
fetchMinBytes: 1,
fetchMaxBytes: 1024 * 1024,
},
}, // 每个消费组对应的相关 consumerGroup 配置
}, {
groupId: 'group2',
topics: [ 'testTopic2', 'testTopic3' ],
consumerOption: {},
options: {},
}, {
groupId: 'group3',
topics: [ 'testTopic3' ],
Expand Down

0 comments on commit 67697b0

Please sign in to comment.