diff --git a/kafka-node/kafka-node-tests.ts b/kafka-node/kafka-node-tests.ts index a5b9e9ca3e..65ca7abb81 100644 --- a/kafka-node/kafka-node-tests.ts +++ b/kafka-node/kafka-node-tests.ts @@ -138,6 +138,24 @@ hlConsumer.resumeTopics([ hlConsumer.close(true, function () {}); +var ackBatchOptions = {'noAckBatchSize': 1024, 'noAckBatchAge': 10}; +var cgOptions: kafka.ConsumerGroupOptions = { + host: 'localhost:2181/', + batch: ackBatchOptions, + groupId: 'groupID', + id: 'consumerID', + sessionTimeout: 15000, + protocol: ["roundrobin"], + fromOffset: "latest", + migrateHLC: false, + migrateRolling: true +}; + +var consumerGroup = new kafka.ConsumerGroup( cgOptions, ['topic1']); +consumerGroup.on('error', (err) => {}); +consumerGroup.on('message', (msg) => {}); +consumerGroup.close(true, () => {}); + var offset = new kafka.Offset(basicClient); offset.on('ready', function(){}); @@ -154,3 +172,6 @@ offset.commit('groupId', [ offset.fetchCommits('groupId', [ { topic: 't', partition: 0 } ], function (err, data) {}); + +offset.fetchLatestOffsets(['t'], (err, offsets) => {}) +offset.fetchEarliestOffsets(['t'], (err, offsets) => {})